Skip to content

Commit

Permalink
Fixing issues with selectionDashArray bleeding into free drawing (#4894
Browse files Browse the repository at this point in the history
…) (#4897)

* Fixing issues with selectionDashArray bleeding into free drawing

* Resetting line dash in _setBrushStyles when there is no strokeDashArray
  • Loading branch information
arlen-yu authored and asturur committed Apr 11, 2018
1 parent fe55cf4 commit d73dbab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/brushes/base_brush.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || []);
}
},

Expand Down

0 comments on commit d73dbab

Please sign in to comment.