Skip to content

Commit 3c12bf6

Browse files
committed
remove unnecessary check for NaNs
1 parent f8cef49 commit 3c12bf6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/traces/treemap/plot.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,6 @@ function plotOne(gd, cd, element, transitionOpts) {
175175
return x + ',' + y;
176176
}
177177

178-
function noNaN(path) {
179-
return path.indexOf('NaN') > -1 ? '' : path;
180-
}
181-
182178
var xStart = viewBarX(0);
183179
var limitX0 = function(p) { p.x = Math.max(xStart, p.x); };
184180

@@ -234,7 +230,7 @@ function plotOne(gd, cd, element, transitionOpts) {
234230
limitX0(pC);
235231
limitX0(pR);
236232

237-
return noNaN(
233+
return (
238234
'M' + pos(pA.x, pA.y) +
239235
'L' + pos(pB.x, pB.y) +
240236
'L' + pos(pR.x, pR.y) +
@@ -265,7 +261,7 @@ function plotOne(gd, cd, element, transitionOpts) {
265261

266262
var arc = function(rx, ry) { return r ? 'a' + pos(r, r) + ' 0 0 1 ' + pos(rx, ry) : ''; };
267263

268-
return noNaN(
264+
return (
269265
'M' + pos(_x0, _y0 + r) +
270266
arc(r, -r) +
271267
'L' + pos(_x1 - r, _y0) +

0 commit comments

Comments
 (0)