File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -331,11 +331,11 @@ function convertPlotlyOptions(scene, data) {
331331 return params ;
332332}
333333
334- function arrayToColor ( color ) {
335- if ( Array . isArray ( color ) ) {
334+ function _arrayToColor ( color ) {
335+ if ( Lib . isArrayOrTypedArray ( color ) ) {
336336 var c = color [ 0 ] ;
337337
338- if ( Array . isArray ( c ) ) color = c ;
338+ if ( Lib . isArrayOrTypedArray ( c ) ) color = c ;
339339
340340 return 'rgb(' + color . slice ( 0 , 3 ) . map ( function ( x ) {
341341 return Math . round ( x * 255 ) ;
@@ -345,6 +345,16 @@ function arrayToColor(color) {
345345 return null ;
346346}
347347
348+ function arrayToColor ( colors ) {
349+ if ( ! Lib . isArrayOrTypedArray ( colors ) ) {
350+ return _arrayToColor ( colors ) ;
351+ }
352+
353+ return colors . map ( function ( color ) {
354+ return _arrayToColor ( color ) ;
355+ } ) ;
356+ }
357+
348358proto . update = function ( data ) {
349359 var gl = this . scene . glplot . gl ;
350360 var lineOptions ;
You can’t perform that action at this time.
0 commit comments