fix: preserve z-indexed subplots during `relayout` for correct pan/zoom by ryan-williams · Pull Request #7659 · plotly/plotly.js

@ryan-williams @claude

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 <noreply@anthropic.com>