@@ -16,7 +16,7 @@ var fill = require('ndarray-fill');
1616var ops = require ( 'ndarray-ops' ) ;
1717var tinycolor = require ( 'tinycolor2' ) ;
1818
19- var Lib = require ( '../../lib' ) ;
19+ var isArrayOrTypedArray = require ( '../../lib' ) . isArrayOrTypedArray ;
2020var str2RgbaArray = require ( '../../lib/str2rgbarray' ) ;
2121
2222var MIN_RESOLUTION = 128 ;
@@ -46,17 +46,17 @@ proto.handlePick = function(selection) {
4646 ] ;
4747 var traceCoordinate = [ 0 , 0 , 0 ] ;
4848
49- if ( ! Lib . isArrayOrTypedArray ( this . data . x ) ) {
49+ if ( ! isArrayOrTypedArray ( this . data . x ) ) {
5050 traceCoordinate [ 0 ] = selectIndex [ 0 ] ;
51- } else if ( Lib . isArrayOrTypedArray ( this . data . x [ 0 ] ) ) {
51+ } else if ( isArrayOrTypedArray ( this . data . x [ 0 ] ) ) {
5252 traceCoordinate [ 0 ] = this . data . x [ selectIndex [ 1 ] ] [ selectIndex [ 0 ] ] ;
5353 } else {
5454 traceCoordinate [ 0 ] = this . data . x [ selectIndex [ 0 ] ] ;
5555 }
5656
57- if ( ! Lib . isArrayOrTypedArray ( this . data . y ) ) {
57+ if ( ! isArrayOrTypedArray ( this . data . y ) ) {
5858 traceCoordinate [ 1 ] = selectIndex [ 1 ] ;
59- } else if ( Lib . isArrayOrTypedArray ( this . data . y [ 0 ] ) ) {
59+ } else if ( isArrayOrTypedArray ( this . data . y [ 0 ] ) ) {
6060 traceCoordinate [ 1 ] = this . data . y [ selectIndex [ 1 ] ] [ selectIndex [ 0 ] ] ;
6161 } else {
6262 traceCoordinate [ 1 ] = this . data . y [ selectIndex [ 1 ] ] ;
@@ -232,11 +232,11 @@ proto.update = function(data) {
232232 } ) ;
233233
234234 // coords x
235- if ( ! Lib . isArrayOrTypedArray ( x ) ) {
235+ if ( ! isArrayOrTypedArray ( x ) ) {
236236 fill ( xc , function ( row ) {
237237 return xaxis . d2l ( row , 0 , xcalendar ) * scaleFactor [ 0 ] ;
238238 } ) ;
239- } else if ( Lib . isArrayOrTypedArray ( x [ 0 ] ) ) {
239+ } else if ( isArrayOrTypedArray ( x [ 0 ] ) ) {
240240 fill ( xc , function ( row , col ) {
241241 return xaxis . d2l ( x [ col ] [ row ] , 0 , xcalendar ) * scaleFactor [ 0 ] ;
242242 } ) ;
@@ -248,11 +248,11 @@ proto.update = function(data) {
248248 }
249249
250250 // coords y
251- if ( ! Lib . isArrayOrTypedArray ( x ) ) {
251+ if ( ! isArrayOrTypedArray ( x ) ) {
252252 fill ( yc , function ( row , col ) {
253253 return yaxis . d2l ( col , 0 , xcalendar ) * scaleFactor [ 1 ] ;
254254 } ) ;
255- } else if ( Lib . isArrayOrTypedArray ( y [ 0 ] ) ) {
255+ } else if ( isArrayOrTypedArray ( y [ 0 ] ) ) {
256256 fill ( yc , function ( row , col ) {
257257 return yaxis . d2l ( y [ col ] [ row ] , 0 , ycalendar ) * scaleFactor [ 1 ] ;
258258 } ) ;
0 commit comments