Skip to content

Commit 879241c

Browse files
committed
fixup comments
1 parent 37287fb commit 879241c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/traces/contour/convert_to_constraints.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ var Lib = require('../../lib');
1414
// need weird range loops and flipped contours instead of the usual format. This function
1515
// does some weird manipulation of the extracted pathinfo data such that it magically
1616
// draws contours correctly *as* constraints.
17+
//
18+
// ** I do not know which "weird range loops" the comment above is referring to.
1719
module.exports = function(pathinfo, operation) {
1820
var i, pi0, pi1;
1921

@@ -29,9 +31,8 @@ module.exports = function(pathinfo, operation) {
2931
Lib.warn('Contour data invalid for the specified inequality operation.');
3032
}
3133

32-
// In this case there should be exactly two contour levels in pathinfo. We
33-
// simply concatenate the info into one pathinfo and flip all of the data
34-
// in one. This will draw the contour as closed.
34+
// In this case there should be exactly one contour levels in pathinfo.
35+
// We flip all of the data. This will draw the contour as closed.
3536
pi0 = pathinfo[0];
3637

3738
for(i = 0; i < pi0.edgepaths.length; i++) {
@@ -54,9 +55,10 @@ module.exports = function(pathinfo, operation) {
5455
Lib.warn('Contour data invalid for the specified inequality range operation.');
5556
}
5657

57-
// In this case there should be exactly two contour levels in pathinfo. We
58-
// simply concatenate the info into one pathinfo and flip all of the data
59-
// in one. This will draw the contour as closed.
58+
// In this case there should be exactly two contour levels in pathinfo.
59+
// - We concatenate the info into one pathinfo.
60+
// - We must also flip all of the data in the `[]` case.
61+
// This will draw the contours as closed.
6062
pi0 = copyPathinfo(pathinfo[0]);
6163
pi1 = copyPathinfo(pathinfo[1]);
6264

0 commit comments

Comments
 (0)