@@ -395,15 +395,16 @@ function plot(gd, subplot, cdata) {
395
395
scene . line2d . update ( scene . lineOptions ) ;
396
396
scene . lineOptions = scene . lineOptions . map ( function ( lineOptions ) {
397
397
if ( lineOptions && lineOptions . positions ) {
398
- var pos = [ ] , srcPos = lineOptions . positions ;
398
+ var pos = [ ] ;
399
+ var srcPos = lineOptions . positions ;
399
400
400
401
var firstptdef = 0 ;
401
402
while ( isNaN ( srcPos [ firstptdef ] ) || isNaN ( srcPos [ firstptdef + 1 ] ) ) {
402
403
firstptdef += 2 ;
403
404
}
404
405
var lastptdef = srcPos . length - 2 ;
405
406
while ( isNaN ( srcPos [ lastptdef ] ) || isNaN ( srcPos [ lastptdef + 1 ] ) ) {
406
- lastptdef += - 2 ;
407
+ lastptdef -= 2 ;
407
408
}
408
409
pos = pos . concat ( srcPos . slice ( firstptdef , lastptdef + 2 ) ) ;
409
410
lineOptions . positions = pos ;
@@ -437,36 +438,38 @@ function plot(gd, subplot, cdata) {
437
438
if ( trace . _nexttrace ) fillData . push ( i + 1 ) ;
438
439
if ( fillData . length ) scene . fillOrder [ i ] = fillData ;
439
440
440
- var pos = [ ] , srcPos = ( lineOptions && lineOptions . positions ) || stash . positions ;
441
+ var pos = [ ] ;
442
+ var srcPos = ( lineOptions && lineOptions . positions ) || stash . positions ;
443
+ var firstptdef , lastptdef ;
441
444
442
445
if ( trace . fill === 'tozeroy' ) {
443
- var firstpdef = 0 ;
444
446
while ( isNaN ( srcPos [ firstpdef + 1 ] ) ) {
445
- firstpdef += 2 ;
447
+ firstptdef = 0 ;
448
+ firstptdef += 2 ;
446
449
}
447
- var lastpdef = srcPos . length - 2 ;
448
450
while ( isNaN ( srcPos [ lastpdef + 1 ] ) ) {
449
- lastpdef += - 2 ;
451
+ lastptdef = srcPos . length - 2 ;
452
+ lastptdef -= 2 ;
450
453
}
451
- if ( srcPos [ firstpdef + 1 ] !== 0 ) {
452
- pos = [ srcPos [ firstpdef ] , 0 ] ;
454
+ if ( srcPos [ firstptdef + 1 ] !== 0 ) {
455
+ pos = [ srcPos [ firstptdef ] , 0 ] ;
453
456
}
454
- pos = pos . concat ( srcPos . slice ( firstpdef , lastpdef + 2 ) ) ;
455
- if ( srcPos [ lastpdef + 1 ] !== 0 ) {
456
- pos = pos . concat ( [ srcPos [ lastpdef ] , 0 ] ) ;
457
+ pos = pos . concat ( srcPos . slice ( firstptdef , lastptdef + 2 ) ) ;
458
+ if ( srcPos [ lastptdef + 1 ] !== 0 ) {
459
+ pos = pos . concat ( [ srcPos [ lastptdef ] , 0 ] ) ;
457
460
}
458
461
}
459
462
else if ( trace . fill === 'tozerox' ) {
460
- var firstptdef = 0 ;
461
463
while ( isNaN ( srcPos [ firstptdef ] ) ) {
464
+ firstptdef = 0 ;
462
465
firstptdef += 2 ;
463
466
}
464
- var lastptdef = srcPos . length - 2 ;
465
467
while ( isNaN ( srcPos [ lastptdef ] ) ) {
466
- lastptdef += - 2 ;
468
+ lastptdef = srcPos . length - 2 ;
469
+ lastptdef -= 2 ;
467
470
}
468
471
if ( srcPos [ firstptdef ] !== 0 ) {
469
- pos = [ 0 , srcPos [ firstptdef + 1 ] ] ;
472
+ pos = [ 0 , srcPos [ firstptdef + 1 ] ] ;
470
473
}
471
474
pos = pos . concat ( srcPos . slice ( firstptdef , lastptdef + 2 ) ) ;
472
475
if ( srcPos [ lastptdef ] !== 0 ) {
0 commit comments