Commit e54fbac
fix: preserve z-indexed subplots during
When traces have different `zorder` values, plotly.js creates z-indexed
subplots (e.g., `xyz2`, `xyz3`) in `drawFramework`. However, when
`relayout` is called (e.g., during resize), `supplyDefaults` resets
`_plots` via `linkSubplots`, losing these z-indexed subplots. Since
`relayout` doesn't trigger `drawFramework`, they aren't recreated.
This caused pan/zoom to fail on the first attempt in react-plotly.js,
because `updateSubplots` in `dragbox.js` couldn't find the z-indexed
subplots to transform.
Fix:
1. In `linkSubplots`, preserve z-indexed subplots from `oldSubplots`
2. In `updateSubplots`, include z-indexed subplots from `_plots`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>relayout for correct pan/zoom1 parent f07f1c7 commit e54fbac
2 files changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
875 | | - | |
| 875 | + | |
876 | 876 | | |
877 | 877 | | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
878 | 887 | | |
879 | 888 | | |
880 | 889 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
895 | 896 | | |
896 | 897 | | |
897 | 898 | | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
898 | 912 | | |
899 | 913 | | |
900 | 914 | | |
| |||
0 commit comments