postDraw sample
This commit is contained in:
@@ -47,14 +47,14 @@ class Graph {
|
||||
}
|
||||
|
||||
draw() {
|
||||
this.preDraw();
|
||||
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
||||
|
||||
this.preDraw(this);
|
||||
this._draw();
|
||||
this.postDraw();
|
||||
this.postDraw(this);
|
||||
}
|
||||
|
||||
_draw() {
|
||||
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
||||
|
||||
this.ctx.beginPath();
|
||||
this.ctx.moveTo(0, 0);
|
||||
|
||||
@@ -86,7 +86,7 @@ class Graph {
|
||||
this.ctx.fill();
|
||||
}
|
||||
|
||||
_dummyFunc() {}
|
||||
_dummyFunc(_) {}
|
||||
}
|
||||
|
||||
class MovingGraph extends Graph {
|
||||
|
||||
Reference in New Issue
Block a user