diff --git a/leaflet.textpath.js b/leaflet.textpath.js index c4a81c5..3469d2e 100755 --- a/leaflet.textpath.js +++ b/leaflet.textpath.js @@ -206,7 +206,7 @@ var PolylineTextPath = { var textNode = L.SVG.create('text'), textPath = L.SVG.create('textPath'); - var dy = options.offset || this._path.getAttribute('stroke-width'); + var dy = 'offset' in options ? options.offset : this._path.getAttribute('stroke-width'); textPath.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", '#'+id); textNode.setAttribute('dy', dy);