From e18f23123ea547e246bfff49c4ae42e03895949c Mon Sep 17 00:00:00 2001 From: Luis Leiva Date: Tue, 23 Jul 2019 09:56:47 +0300 Subject: [PATCH] Revised saveGraphics --- src/jsketch.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/jsketch.js b/src/jsketch.js index 075abb0..b4ccfc9 100644 --- a/src/jsketch.js +++ b/src/jsketch.js @@ -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; }, /**