Revised saveGraphics

This commit is contained in:
Luis Leiva 2019-07-23 09:56:47 +03:00
parent 5a9726c104
commit e18f23123e
1 changed files with 1 additions and 3 deletions

View File

@ -145,7 +145,7 @@
* @memberof jSketch
*/
beginFill: function(color) {
this.saveGraphics();
this.saveGraphics({ fillStyle: color });
this.context.fillStyle = color;
this.callStack.push({ property: 'fillStyle', value: color });
return this;
@ -393,7 +393,6 @@
* @memberof jSketch
*/
beginPath: function() {
this.saveGraphics();
this.context.beginPath();
this.callStack.push({ method: 'beginPath' });
return this;
@ -406,7 +405,6 @@
closePath: function() {
this.context.closePath();
this.callStack.push({ method: 'closePath' });
this.restoreGraphics();
return this;
},
/**