@@ -16,7 +16,7 @@ var fill = require('ndarray-fill');
16
16
var ops = require ( 'ndarray-ops' ) ;
17
17
var tinycolor = require ( 'tinycolor2' ) ;
18
18
19
- var Lib = require ( '../../lib' ) ;
19
+ var isArrayOrTypedArray = require ( '../../lib' ) . isArrayOrTypedArray ;
20
20
var str2RgbaArray = require ( '../../lib/str2rgbarray' ) ;
21
21
22
22
var MIN_RESOLUTION = 128 ;
@@ -46,17 +46,17 @@ proto.handlePick = function(selection) {
46
46
] ;
47
47
var traceCoordinate = [ 0 , 0 , 0 ] ;
48
48
49
- if ( ! Lib . isArrayOrTypedArray ( this . data . x ) ) {
49
+ if ( ! isArrayOrTypedArray ( this . data . x ) ) {
50
50
traceCoordinate [ 0 ] = selectIndex [ 0 ] ;
51
- } else if ( Lib . isArrayOrTypedArray ( this . data . x [ 0 ] ) ) {
51
+ } else if ( isArrayOrTypedArray ( this . data . x [ 0 ] ) ) {
52
52
traceCoordinate [ 0 ] = this . data . x [ selectIndex [ 1 ] ] [ selectIndex [ 0 ] ] ;
53
53
} else {
54
54
traceCoordinate [ 0 ] = this . data . x [ selectIndex [ 0 ] ] ;
55
55
}
56
56
57
- if ( ! Lib . isArrayOrTypedArray ( this . data . y ) ) {
57
+ if ( ! isArrayOrTypedArray ( this . data . y ) ) {
58
58
traceCoordinate [ 1 ] = selectIndex [ 1 ] ;
59
- } else if ( Lib . isArrayOrTypedArray ( this . data . y [ 0 ] ) ) {
59
+ } else if ( isArrayOrTypedArray ( this . data . y [ 0 ] ) ) {
60
60
traceCoordinate [ 1 ] = this . data . y [ selectIndex [ 1 ] ] [ selectIndex [ 0 ] ] ;
61
61
} else {
62
62
traceCoordinate [ 1 ] = this . data . y [ selectIndex [ 1 ] ] ;
@@ -232,11 +232,11 @@ proto.update = function(data) {
232
232
} ) ;
233
233
234
234
// coords x
235
- if ( ! Lib . isArrayOrTypedArray ( x ) ) {
235
+ if ( ! isArrayOrTypedArray ( x ) ) {
236
236
fill ( xc , function ( row ) {
237
237
return xaxis . d2l ( row , 0 , xcalendar ) * scaleFactor [ 0 ] ;
238
238
} ) ;
239
- } else if ( Lib . isArrayOrTypedArray ( x [ 0 ] ) ) {
239
+ } else if ( isArrayOrTypedArray ( x [ 0 ] ) ) {
240
240
fill ( xc , function ( row , col ) {
241
241
return xaxis . d2l ( x [ col ] [ row ] , 0 , xcalendar ) * scaleFactor [ 0 ] ;
242
242
} ) ;
@@ -248,11 +248,11 @@ proto.update = function(data) {
248
248
}
249
249
250
250
// coords y
251
- if ( ! Lib . isArrayOrTypedArray ( x ) ) {
251
+ if ( ! isArrayOrTypedArray ( x ) ) {
252
252
fill ( yc , function ( row , col ) {
253
253
return yaxis . d2l ( col , 0 , xcalendar ) * scaleFactor [ 1 ] ;
254
254
} ) ;
255
- } else if ( Lib . isArrayOrTypedArray ( y [ 0 ] ) ) {
255
+ } else if ( isArrayOrTypedArray ( y [ 0 ] ) ) {
256
256
fill ( yc , function ( row , col ) {
257
257
return yaxis . d2l ( y [ col ] [ row ] , 0 , ycalendar ) * scaleFactor [ 1 ] ;
258
258
} ) ;
0 commit comments