Removed unnecessary callstack events

This commit is contained in:
Luis Leiva 2019-05-26 18:30:35 +03:00
parent cd53ca6f72
commit fae25eec5a
1 changed files with 1 additions and 4 deletions

View File

@ -248,7 +248,7 @@
*/ */
stroke: function() { stroke: function() {
this.context.stroke(); this.context.stroke();
this.callStack.push({ method: 'stroke', args: [] }); this.callStack.push({ method: 'stroke' });
return this; return this;
}, },
/** /**
@ -428,7 +428,6 @@
var args = [0, 0, this.stageWidth, this.stageHeight]; var args = [0, 0, this.stageWidth, this.stageHeight];
// Note: using 'this.canvas.width = this.canvas.width' resets _all_ styles, so better use clearRect. // Note: using 'this.canvas.width = this.canvas.width' resets _all_ styles, so better use clearRect.
this.context.clearRect.apply(this.context, args); this.context.clearRect.apply(this.context, args);
this.callStack.push({ method: 'fillRect', args: args });
return this; return this;
}, },
/** /**
@ -472,8 +471,6 @@
var nativeProps = 'fillStyle strokeStyle lineWidth lineCap lineJoin miterLimit'.split(' ') var nativeProps = 'fillStyle strokeStyle lineWidth lineCap lineJoin miterLimit'.split(' ')
for (var opt in this.data) { for (var opt in this.data) {
this.context[opt] = this.data[opt]; this.context[opt] = this.data[opt];
if (nativeProps.indexOf(opt) > -1)
this.callStack.push({ property: opt, value: this.data[opt] });
} }
return this; return this;
}, },