Skip to content

Sync all relayout changes back to the figure prop, not only shapes#3882

Open
T4rk1n wants to merge 1 commit into
devfrom
fix/relayout
Open

Sync all relayout changes back to the figure prop, not only shapes#3882
T4rk1n wants to merge 1 commit into
devfrom
fix/relayout

Conversation

@T4rk1n

@T4rk1n T4rk1n commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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

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>
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Patch update with relayoutData no longer working after Dash 4.1 to 4.2 upgrade

1 participant