fixed save/restore regression introduced in context._stroke() method

This commit is contained in:
Eric Rowell
2013-09-15 23:42:12 -07:00
parent f31ff0b9e8
commit ede6fb2e17
2 changed files with 22 additions and 40 deletions

View File

@@ -524,13 +524,16 @@
_stroke: function(shape, skipShadow) {
var stroke = shape.getStroke(),
strokeWidth = shape.getStrokeWidth(),
dashArray = shape.getDashArray();
dashArray = shape.getDashArray(),
strokeScaleEnabled = shape.getStrokeScaleEnabled();
if(stroke || strokeWidth) {
if (!shape.getStrokeScaleEnabled()) {
if (!strokeScaleEnabled) {
this.save();
this.setTransform(1, 0, 0, 1, 0, 0);
}
/////////////////////
this._applyLineCap(shape);
if(dashArray && shape.getDashArrayEnabled()) {
this.setLineDash(dashArray);
@@ -543,9 +546,13 @@
shape._strokeFunc(this);
if(!skipShadow && shape.hasShadow()) {
this.restore();
this._stroke(shape, true);
}
/////////////////////
if (!strokeScaleEnabled) {
this.restore();
}
}
},
_applyShadow: function(shape) {