Bläddra i källkod

Some minor refactoring of CTRLPainter

dev-tmpl
Bryan Miller 5 år sedan
förälder
incheckning
9f77e89b3b
1 ändrade filer med 3 tillägg och 5 borttagningar
  1. +3
    -5
      app/js/ctrls/CTRLPainter.js

+ 3
- 5
app/js/ctrls/CTRLPainter.js Visa fil

@@ -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...

Laddar…
Avbryt
Spara