Skip to content

Commit 4810585

Browse files
committed
handle typed arrays in selectedpoints
1 parent 11e0bf0 commit 4810585

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/plots/plots.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ var getModuleCalcData = require('../plots/get_data').getModuleCalcData;
2525
var relinkPrivateKeys = Lib.relinkPrivateKeys;
2626
var _ = Lib._;
2727

28+
var isTypedArraySpec = require('../lib/array').isTypedArraySpec;
29+
var decodeTypedArraySpec = require('../lib/array').decodeTypedArraySpec;
30+
2831
var plots = module.exports = {};
2932

3033
// Expose registry methods on Plots for backward-compatibility
@@ -1356,7 +1359,10 @@ plots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, trac
13561359
}
13571360

13581361
if(_module && _module.selectPoints) {
1359-
coerce('selectedpoints');
1362+
var selectedpoints = coerce('selectedpoints');
1363+
if(isTypedArraySpec(selectedpoints)) {
1364+
traceOut.selectedpoints = Array.from(decodeTypedArraySpec(selectedpoints));
1365+
}
13601366
}
13611367

13621368
plots.supplyTransformDefaults(traceIn, traceOut, layout);

0 commit comments

Comments
 (0)