[Pkg-javascript-commits] [leaflet] 07/301: New stroke-linejoin style option with a VML alternative. For #1843.

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 22:22:38 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit a2c987febc503a4e44ecdb30091ac9749bdada38
Author: palewire <ben.welsh at gmail.com>
Date:   Fri Jul 12 22:49:26 2013 -0700

    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 9e08557..f1bd43a 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 cf98a72..ae5dfe4 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 14a1484..b4ffeac 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,
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list