File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ HTMLWidgets.widget({
17
17
18
18
renderValue : function ( el , x , instance ) {
19
19
20
+ console . log ( instance ) ;
21
+
20
22
/*
21
23
/ 'inform the world' about highlighting options this is so other
22
24
/ crosstalk libraries have a chance to respond to special settings
@@ -263,10 +265,13 @@ HTMLWidgets.widget({
263
265
for ( var i = 0 ; i < attrsToAttach . length ; i ++ ) {
264
266
var attr = trace [ attrsToAttach [ i ] ] ;
265
267
if ( Array . isArray ( attr ) ) {
266
- // pointNumber can be an array (e.g., heatmaps)
267
- // TODO: can pointNumber be 3D?
268
- obj [ attrsToAttach [ i ] ] = typeof pt . pointNumber === "number" ?
269
- attr [ pt . pointNumber ] : attr [ pt . pointNumber [ 0 ] ] [ pt . pointNumber [ 1 ] ] ;
268
+ var ptNums = pt . pointNumber || pt . pointNumbers ;
269
+ if ( typeof ptNums === "number" ) {
270
+ ptNums = [ ptNums ] ;
271
+ }
272
+ if ( Array . isArray ( ptNums ) ) {
273
+ obj [ attrsToAttach [ i ] ] = ptNums . map ( function ( i ) { return attr [ i ] ; } ) ;
274
+ }
270
275
}
271
276
}
272
277
return obj ;
You can’t perform that action at this time.
0 commit comments