Skip to content

Commit 6f9a59d

Browse files
committed
return early in closeBoundaries when constraint level have edgepath(s)
... in this case joinAllPaths does enough already to render the constraint contours correctly.
1 parent 26e66fe commit 6f9a59d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: src/traces/contour/close_boundaries.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ module.exports = function(pathinfo, contours) {
3131
// after convertToConstraints, pathinfo has length=0
3232
pi0.prefixBoundary = false;
3333

34+
// joinAllPaths does enough already when edgepaths are present
35+
if(pi0.edgepaths.length) return;
36+
3437
var na = pi0.x.length;
3538
var nb = pi0.y.length;
3639
var boundaryMax = -Infinity;
@@ -60,15 +63,15 @@ module.exports = function(pathinfo, contours) {
6063
break;
6164
case '<':
6265
if(contoursValue < boundaryMin ||
63-
(!pi0.edgepaths.length && pi0.starts.length && contoursValue === boundaryMin)) {
66+
(pi0.starts.length && contoursValue === boundaryMin)) {
6467
pi0.prefixBoundary = true;
6568
}
6669
break;
6770
case '[]':
6871
v1 = Math.min(contoursValue[0], contoursValue[1]);
6972
v2 = Math.max(contoursValue[0], contoursValue[1]);
7073
if(v2 < boundaryMin || v1 > boundaryMax ||
71-
(!pi0.edgepaths.length && pi0.starts.length && v2 === boundaryMin)) {
74+
(pi0.starts.length && v2 === boundaryMin)) {
7275
pi0.prefixBoundary = true;
7376
}
7477
break;

0 commit comments

Comments
 (0)