Merge pull request #2524 from jeffsmale90/dasharray-offset
Added Dasharray offset
This commit is contained in:
commit
b626553bc2
@ -12,6 +12,7 @@ L.Path = L.Layer.extend({
|
||||
lineCap: 'round',
|
||||
lineJoin: 'round',
|
||||
// dashArray: null
|
||||
// dashOffset: null
|
||||
|
||||
// fill: false
|
||||
// fillColor: same as color by default
|
||||
|
@ -93,6 +93,11 @@ L.SVG = L.Renderer.extend({
|
||||
path.removeAttribute('stroke-dasharray');
|
||||
}
|
||||
|
||||
if (options.dashOffset) {
|
||||
path.setAttribute('stroke-dashoffset', options.dashOffset);
|
||||
} else {
|
||||
path.removeAttribute('stroke-dashoffset');
|
||||
}
|
||||
} else {
|
||||
path.setAttribute('stroke', 'none');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user