Skip to content

Commit 4ea04d5

Browse files
committed
fixing the function to use totalDist
1 parent 8860759 commit 4ea04d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/traces/surface/convert.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ proto.calcXnums = function(xlen) {
241241
if(nums[i - 1] === 0) {
242242
nums[i - 1] = 1;
243243
} else {
244-
nums[i - 1] = Math.round(totalDist);
244+
nums[i - 1] = Math.round(totalDist / nums[i - 1]);
245245
}
246246
}
247247

@@ -273,7 +273,7 @@ proto.calcYnums = function(ylen) {
273273
if(nums[i - 1] === 0) {
274274
nums[i - 1] = 1;
275275
} else {
276-
nums[i - 1] = Math.round(totalDist);
276+
nums[i - 1] = Math.round(totalDist / nums[i - 1]);
277277
}
278278
}
279279

0 commit comments

Comments
 (0)