Fix open paths rendering as closed
Only close a loop path when the last segment ends at the first segment's start vertex.
This commit is contained in:
parent
b4c7700f05
commit
f741eaa296
|
|
@ -188,7 +188,11 @@ function addLoopToPath(
|
|||
for (const segIdx of loop) {
|
||||
addSegmentToPath(path, segments[segIdx], vertices)
|
||||
}
|
||||
path.close()
|
||||
|
||||
const lastSeg = segments[loop[loop.length - 1]]
|
||||
if (lastSeg.end === firstSeg.start) {
|
||||
path.close()
|
||||
}
|
||||
}
|
||||
|
||||
function addSegmentToPath(
|
||||
|
|
|
|||
Loading…
Reference in a new issue