From 2ea93191bc783df8cd5832154e9f0b8b97f82b5c Mon Sep 17 00:00:00 2001 From: palewire Date: Fri, 12 Jul 2013 22:49:26 -0700 Subject: [PATCH] New stroke-linejoin style option with a VML alternative. For #1843. --- src/layer/vector/Path.SVG.js | 3 +++ src/layer/vector/Path.VML.js | 3 +++ src/layer/vector/Path.js | 1 + 3 files changed, 7 insertions(+) diff --git a/src/layer/vector/Path.SVG.js b/src/layer/vector/Path.SVG.js index 9e08557d..f1bd43aa 100644 --- a/src/layer/vector/Path.SVG.js +++ b/src/layer/vector/Path.SVG.js @@ -83,6 +83,9 @@ L.Path = L.Path.extend({ if (this.options.linecap) { this._path.setAttribute('stroke-linecap', this.options.linecap); } + if (this.options.linejoin) { + this._path.setAttribute('stroke-linejoin', this.options.linejoin); + } } else { this._path.setAttribute('stroke', 'none'); } diff --git a/src/layer/vector/Path.VML.js b/src/layer/vector/Path.VML.js index cf98a72d..ae5dfe4c 100644 --- a/src/layer/vector/Path.VML.js +++ b/src/layer/vector/Path.VML.js @@ -85,6 +85,9 @@ L.Path = L.Browser.svg || !L.Browser.vml ? L.Path : L.Path.extend({ if (options.linecap) { stroke.endcap = options.linecap.replace('butt', 'flat'); } + if (options.linejoin) { + stroke.joinstyle = options.linejoin; + } } else if (stroke) { container.removeChild(stroke); diff --git a/src/layer/vector/Path.js b/src/layer/vector/Path.js index 14a14849..b4ffeac9 100644 --- a/src/layer/vector/Path.js +++ b/src/layer/vector/Path.js @@ -19,6 +19,7 @@ L.Path = L.Class.extend({ color: '#0033ff', dashArray: null, linecap: null, + linejoin: null, weight: 5, opacity: 0.5,