Skip to content

Commit 2ea9319

Browse files
committed
New stroke-linejoin style option with a VML alternative. For Leaflet#1843.
1 parent 665a956 commit 2ea9319

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/layer/vector/Path.SVG.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ L.Path = L.Path.extend({
8383
if (this.options.linecap) {
8484
this._path.setAttribute('stroke-linecap', this.options.linecap);
8585
}
86+
if (this.options.linejoin) {
87+
this._path.setAttribute('stroke-linejoin', this.options.linejoin);
88+
}
8689
} else {
8790
this._path.setAttribute('stroke', 'none');
8891
}

src/layer/vector/Path.VML.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ L.Path = L.Browser.svg || !L.Browser.vml ? L.Path : L.Path.extend({
8585
if (options.linecap) {
8686
stroke.endcap = options.linecap.replace('butt', 'flat');
8787
}
88+
if (options.linejoin) {
89+
stroke.joinstyle = options.linejoin;
90+
}
8891

8992
} else if (stroke) {
9093
container.removeChild(stroke);

src/layer/vector/Path.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ L.Path = L.Class.extend({
1919
color: '#0033ff',
2020
dashArray: null,
2121
linecap: null,
22+
linejoin: null,
2223
weight: 5,
2324
opacity: 0.5,
2425

0 commit comments

Comments
 (0)