Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
Option to choose repeat spacing text distance
Browse files Browse the repository at this point in the history
  • Loading branch information
nekromoff authored Oct 8, 2023
1 parent 20e7d10 commit 2c3542d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions leaflet.textpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ var PolylineTextPath = {
this._path.setAttribute('id', id);

if (options.repeat) {
if (options.repeat!=true && options.repeat>=1) {
text=text.padStart(options.repeat, '\u00A0');
}
/* Compute single pattern length */
var pattern = L.SVG.create('text');
for (var attr in options.attributes)
Expand Down

0 comments on commit 2c3542d

Please sign in to comment.