Browse Source

Some minor refactoring of CTRLPainter

dev-tmpl
Bryan Miller 5 years ago
parent
commit
9f77e89b3b
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      app/js/ctrls/CTRLPainter.js

+ 3
- 5
app/js/ctrls/CTRLPainter.js View File

@@ -85,7 +85,7 @@ class CTRLPainter {
return;
}
this.__surface = surf;
this.centerSurface();
this.center_surface();
this.render();
}).bind(this);
GlobalEvents.listen("change_surface", handle_change_surface);
@@ -130,7 +130,7 @@ class CTRLPainter {
ResizeCanvasImg(canvas.clientWidth, canvas.clientHeight); // A forced "resize".
input.mouseTargetElement = canvas;

this.centerSurface();
this.center_surface();
}
return this;
}
@@ -145,7 +145,7 @@ class CTRLPainter {
return this;
}

centerSurface(){
center_surface(){
if (canvas === null || this.__surface === null)
return;

@@ -161,8 +161,6 @@ class CTRLPainter {
// Get the contexts initial fillStyle. Don't want the render operation to override it.
var fillStyle = context.fillStyle;

var ie = this.__offset[0] + this.__surface.width;
var je = this.__offset[1] + this.__surface.height;
var scalemult = 1.0/this.__scale;

// Clearing the context surface...

Loading…
Cancel
Save