From 06d74687728237464e09c5b895e6409816413b4c Mon Sep 17 00:00:00 2001 From: Joshua Horowitz Date: Wed, 10 May 2017 12:23:42 -0700 Subject: [PATCH] Add 'Line Dash' attribute to Stroke --- src/Graphic/Graphic.coffee | 1 + src/Model/Model.coffee | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Graphic/Graphic.coffee b/src/Graphic/Graphic.coffee index fbaf5b8..1b95f29 100644 --- a/src/Graphic/Graphic.coffee +++ b/src/Graphic/Graphic.coffee @@ -470,6 +470,7 @@ class Graphic.Stroke extends Graphic.PaintOp matrix.canvasTransform(ctx) ctx.strokeStyle = @color ctx.lineWidth = @lineWidth + ctx.setLineDash(@lineDash) if @lineDash ctx.stroke() ctx.restore() diff --git a/src/Model/Model.coffee b/src/Model/Model.coffee index 9692324..39887fd 100644 --- a/src/Model/Model.coffee +++ b/src/Model/Model.coffee @@ -105,6 +105,7 @@ Model.Stroke = Model.Component.createVariant Model.Stroke.addChildren [ createAttribute("Stroke Color", "color", "rgba(0.60, 0.60, 0.60, 1.00)") createAttribute("Line Width", "lineWidth", "1") + createAttribute("Line Dash", "lineDash", "[]") createAttribute("Scale Stroke?", "scale", "false") ]