diff --git a/leaflet.textpath.js b/leaflet.textpath.js index e973f65..85234f9 100755 --- a/leaflet.textpath.js +++ b/leaflet.textpath.js @@ -87,8 +87,11 @@ var PolylineTextPath = { if (options.repeat) { /* Compute single pattern length */ var pattern = L.SVG.create('text'); - for (var attr in options.attributes) - pattern.setAttribute(attr, options.attributes[attr]); + for (var attr in options.attributes) { + if (!(options.attributes.patternExcludeAttr && options.attributes.patternExcludeAttr[attr])) { + pattern.setAttribute(attr, options.attributes[attr]); + } + } pattern.appendChild(document.createTextNode(text)); svg.appendChild(pattern); var alength = pattern.getComputedTextLength();