Skip to content

Commit 5441ef9

Browse files
committed
simplify line position cleanup
1 parent dfdb1f4 commit 5441ef9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/traces/scattergl/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ function plot(gd, subplot, cdata) {
395395
scene.line2d.update(scene.lineOptions);
396396
scene.lineOptions = scene.lineOptions.map(function(lineOptions) {
397397
if(lineOptions && lineOptions.positions) {
398-
var pos = [];
399398
var srcPos = lineOptions.positions;
400399

401400
var firstptdef = 0;
@@ -406,8 +405,7 @@ function plot(gd, subplot, cdata) {
406405
while(lastptdef > -1 && (isNaN(srcPos[lastptdef]) || isNaN(srcPos[lastptdef + 1]))) {
407406
lastptdef -= 2;
408407
}
409-
pos = pos.concat(srcPos.slice(firstptdef, lastptdef + 2));
410-
lineOptions.positions = pos;
408+
lineOptions.positions = srcPos.slice(firstptdef, lastptdef + 2);
411409
}
412410
return lineOptions;
413411
});

0 commit comments

Comments
 (0)