Skip to content

Commit

Permalink
fixes issue bbecquet#86: Decorators drawn outside of line boundaries …
Browse files Browse the repository at this point in the history
…when zoomed out
  • Loading branch information
crowmagnumb committed Jul 2, 2018
1 parent 96858e8 commit b738e48
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/patternUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ function projectPatternOnPointPath(pts, pattern) {

const totalPathLength = segments[nbSegments - 1].distB;

if (
totalPathLength < pattern.offset.value ||
totalPathLength < pattern.symbolFactory.options.pixelSize
) {
return [];
}

const offset = asRatioToPathLength(pattern.offset, totalPathLength);
const endOffset = asRatioToPathLength(pattern.endOffset, totalPathLength);
const repeat = asRatioToPathLength(pattern.repeat, totalPathLength);
Expand Down

0 comments on commit b738e48

Please sign in to comment.