@@ -104,9 +104,9 @@ function LineWithMarkers(scene, uid) {
104
104
var proto = LineWithMarkers . prototype ;
105
105
106
106
proto . handlePick = function ( pickResult ) {
107
- var index = pickResult . pointId
108
- if ( pickResult . object !== this . line || this . connectgaps ) {
109
- index = this . idToIndex [ pickResult . pointId ] ;
107
+ var index = pickResult . pointId ;
108
+ if ( pickResult . object !== this . line || this . connectgaps ) {
109
+ index = this . idToIndex [ pickResult . pointId ] ;
110
110
}
111
111
112
112
return {
@@ -252,7 +252,7 @@ proto.update = function(options) {
252
252
this . name = options . name ;
253
253
this . hoverinfo = options . hoverinfo ;
254
254
this . bounds = [ Infinity , Infinity , - Infinity , - Infinity ] ;
255
- this . connectgaps = ! ! options . connectgaps
255
+ this . connectgaps = ! ! options . connectgaps ;
256
256
257
257
if ( this . isFancy ( options ) ) {
258
258
this . updateFancy ( options ) ;
@@ -465,28 +465,29 @@ proto.updateFancy = function(options) {
465
465
} ;
466
466
467
467
proto . updateLines = function ( options , positions ) {
468
+ var i ;
468
469
if ( this . hasLines ) {
469
- var linePositions = positions
470
- if ( ! options . connectgaps ) {
471
- var p = 0 ;
472
- var x = this . xData ;
473
- var y = this . yData ;
474
- linePositions = new Float32Array ( 2 * x . length )
475
-
476
- for ( var i = 0 ; i < x . length ; ++ i ) {
477
- linePositions [ p ++ ] = x [ i ]
478
- linePositions [ p ++ ] = y [ i ]
479
- }
470
+ var linePositions = positions ;
471
+ if ( ! options . connectgaps ) {
472
+ var p = 0 ;
473
+ var x = this . xData ;
474
+ var y = this . yData ;
475
+ linePositions = new Float32Array ( 2 * x . length ) ;
476
+
477
+ for ( i = 0 ; i < x . length ; ++ i ) {
478
+ linePositions [ p ++ ] = x [ i ] ;
479
+ linePositions [ p ++ ] = y [ i ] ;
480
+ }
480
481
}
481
- this . lineOptions . positions = linePositions
482
+ this . lineOptions . positions = linePositions ;
482
483
483
484
var lineColor = str2RGBArray ( options . line . color ) ;
484
485
if ( this . hasMarkers ) lineColor [ 3 ] *= options . marker . opacity ;
485
486
486
487
var lineWidth = Math . round ( 0.5 * this . lineOptions . width ) ,
487
488
dashes = ( DASHES [ options . line . dash ] || [ 1 ] ) . slice ( ) ;
488
489
489
- for ( var i = 0 ; i < dashes . length ; ++ i ) dashes [ i ] *= lineWidth ;
490
+ for ( i = 0 ; i < dashes . length ; ++ i ) dashes [ i ] *= lineWidth ;
490
491
491
492
switch ( options . fill ) {
492
493
case 'tozeroy' :
0 commit comments