Skip to content

Commit e9270fc

Browse files
committed
handle transforms in Plotly.react - by looking at _fullInput
1 parent 898c39d commit e9270fc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/plot_api/plot_api.js

+7
Original file line numberDiff line numberDiff line change
@@ -2421,6 +2421,13 @@ function getDiffFlags(oldContainer, newContainer, outerparts, opts) {
24212421
return valObject.valType === 'data_array' || valObject.arrayOk;
24222422
}
24232423

2424+
// for transforms: look at _fullInput rather than the transform result, which often
2425+
// contains generated arrays.
2426+
var newFullInput = newContainer._fullInput;
2427+
var oldFullInput = oldContainer._fullInput;
2428+
if(newFullInput && newFullInput !== newContainer) newContainer = newFullInput;
2429+
if(oldFullInput && oldFullInput !== oldContainer) oldContainer = oldFullInput;
2430+
24242431
for(key in oldContainer) {
24252432
// short-circuit based on previous calls or previous keys that already maximized the pathway
24262433
if(flags.calc) return;

0 commit comments

Comments
 (0)