Uh oh!
There was an error while loading. Please reload this page.
Sync all relayout changes back to the figure prop, not only shapes - #3882
Merged
Conversation
Since #3785 getLayout() clones the layout, so plotly.js writes user interactions (pan/zoom ranges, edited annotations, ...) only into its own copy (gd.layout) and the figure prop goes stale. A subsequent Patch update is applied to the stale figure and reverts the user's view. Generalize the shapes-only sync in the plotly_relayout handler to every layout key touched by the relayout event, excluding autosize/width/height which come from the resize machinery rather than user interactions. Fixes#3810 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
camdecoster
approved these changes
Jul 13, 2026
Uh oh!
There was an error while loading. Please reload this page.
guidocioni added a commit
to guidocioni/point_wx
that referenced
this pull request
Aug 11, 2026
Dash 4.4.1 changed dcc.Graph to sync all relayout changes (not just shape edits) back into the "figure" prop, so every zoom/pan/autoscale/ reset-axes interaction now also updates "figure" - see plotly/dash#3882, fixing plotly/dash#3810. Our clientside scroll-to-figure callback was keyed off Input(figure=ALL, "figure"), so any graph interaction re-triggered it and scrolled the page back to the plot mid-interaction. Decouple the trigger from the Graph "figure" prop: each page's figure callback now writes to a dedicated "figure-ready-signal" Store on its success path only (no_update on validation/error branches), and the clientside callback listens on that instead. Also switch the scroll target from the {"type": "figure", id} pattern (only present on 7 of 9 pages) to the {"type": "fade", index} Collapse wrapper present on every page, which also brings scroll-to-figure to model_climate and model_climate_daily for the first time. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Since #3785
getLayout()clones the layout, so plotly.js writes user interactions (pan/zoom ranges, edited annotations, ...) only into its own copy (gd.layout) and the figure prop goes stale. A subsequent Patch update is applied to the stale figure and reverts the user's view. Generalize the shapes-only sync in theplotly_relayouthandler to every layout key touched by the relayout event, excluding autosize/width/height which come from the resize machinery rather than user interactions.Fixes#3810