From d73dbabb15a84f45f4c6c6daf6f38f0d361c3efc Mon Sep 17 00:00:00 2001 From: Arlen Yu Date: Wed, 11 Apr 2018 05:45:23 -0400 Subject: [PATCH] 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 --- src/brushes/base_brush.class.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/brushes/base_brush.class.js b/src/brushes/base_brush.class.js index 5dc741ad5d5..0a47dd54cad 100644 --- a/src/brushes/base_brush.class.js +++ b/src/brushes/base_brush.class.js @@ -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 || []); } },