Revised save/restoreGraphics

This commit is contained in:
Luis Leiva 2017-11-07 08:43:00 +01:00
parent c1ba4fe577
commit d57c92f37c
1 changed files with 3 additions and 4 deletions

View File

@ -90,7 +90,7 @@
// Remember graphic options for later saving/restoring drawing status.
this.saveGraphics(options);
// Apply defaults.
this.restoreGraphics(options);
this.restoreGraphics();
return this;
},
/**
@ -172,7 +172,7 @@
miterLimit: miter || this.graphics.miterLimit
};
this.saveGraphics(options);
this.restoreGraphics(options);
this.restoreGraphics();
return this;
},
/**
@ -397,8 +397,7 @@
* @memberof jSketch
*/
saveGraphics: function(options) {
if (typeof options === 'undefined') options = this.data.options;
this.data.options = options;
if (typeof options !== 'undefined') this.data.options = options;
return this;
},
/**