mirror of https://github.com/luileito/jsketch.git
Revised save/restoreGraphics
This commit is contained in:
parent
c1ba4fe577
commit
d57c92f37c
|
|
@ -90,7 +90,7 @@
|
||||||
// Remember graphic options for later saving/restoring drawing status.
|
// Remember graphic options for later saving/restoring drawing status.
|
||||||
this.saveGraphics(options);
|
this.saveGraphics(options);
|
||||||
// Apply defaults.
|
// Apply defaults.
|
||||||
this.restoreGraphics(options);
|
this.restoreGraphics();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
@ -172,7 +172,7 @@
|
||||||
miterLimit: miter || this.graphics.miterLimit
|
miterLimit: miter || this.graphics.miterLimit
|
||||||
};
|
};
|
||||||
this.saveGraphics(options);
|
this.saveGraphics(options);
|
||||||
this.restoreGraphics(options);
|
this.restoreGraphics();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
@ -397,8 +397,7 @@
|
||||||
* @memberof jSketch
|
* @memberof jSketch
|
||||||
*/
|
*/
|
||||||
saveGraphics: function(options) {
|
saveGraphics: function(options) {
|
||||||
if (typeof options === 'undefined') options = this.data.options;
|
if (typeof options !== 'undefined') this.data.options = options;
|
||||||
this.data.options = options;
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue