Skip to content

Commit

Permalink
fixes issue #86: Decorators drawn when offset larger than line length
Browse files Browse the repository at this point in the history
  • Loading branch information
plepe committed Nov 12, 2018
1 parent 96858e8 commit 027e531
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/patternUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ function projectPatternOnPointPath(pts, pattern) {
// 2. generate the positions of the pattern as offsets from the path start
const positionOffsets = [];
let positionOffset = startOffsetPixels;
do {
while(repeatIntervalPixels > 0 && positionOffset < totalPathLength - endOffsetPixels) {
positionOffsets.push(positionOffset);
positionOffset += repeatIntervalPixels;
} while(repeatIntervalPixels > 0 && positionOffset < totalPathLength - endOffsetPixels);
}

// 3. projects offsets to segments
let segmentIndex = 0;
Expand Down

0 comments on commit 027e531

Please sign in to comment.