Merge pull request #2524 from jeffsmale90/dasharray-offset

Added Dasharray offset
This commit is contained in:
Vladimir Agafonkin 2014-03-19 11:56:15 -07:00
commit b626553bc2
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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');
}