Fixing issues with selectionDashArray bleeding into free drawing (#4894) (#4897)

* Fixing issues with selectionDashArray bleeding into free drawing

* Resetting line dash in _setBrushStyles when there is no strokeDashArray
This commit is contained in:
Arlen Yu 2018-04-11 05:45:23 -04:00 committed by Andrea Bogazzi
parent fe55cf4d4a
commit d73dbabb15

View file

@ -78,8 +78,8 @@ fabric.BaseBrush = fabric.util.createClass(/** @lends fabric.BaseBrush.prototype
ctx.lineCap = this.strokeLineCap;
ctx.miterLimit = this.strokeMiterLimit;
ctx.lineJoin = this.strokeLineJoin;
if (this.strokeDashArray && fabric.StaticCanvas.supports('setLineDash')) {
ctx.setLineDash(this.strokeDashArray);
if (fabric.StaticCanvas.supports('setLineDash')) {
ctx.setLineDash(this.strokeDashArray || []);
}
},