Skip to content

Better resizing logic #1575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2019
Merged

Better resizing logic #1575

merged 2 commits into from
Oct 8, 2019

Conversation

cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Jul 12, 2019

@jcheng5 I dug deeper into the root issue behind #1553. It turns out that Plotly.relayout() mutates input to Plotly.plot() (minimal example). Normally this doesn't pose a problem for resizing logic, but for that dynamic UI example, renderValue gets called twice for every widget (meaning x.layout.width, and instance.width is populated during the second render).

Anyway, after this discovery, I think it's safer to make a deep copy of width/height/autosize at the start of renderValue (instead of using attributes attached to the DOM element)

Copy link
Contributor

@jcheng5 jcheng5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I’m not sure about this, let’s discuss in person today.

@cpsievert cpsievert changed the title Use DOM el attributes to find specified height/width, closes #1553 Better resizing logic Aug 30, 2019
@cpsievert cpsievert merged commit 6f1925a into master Oct 8, 2019
@cpsievert cpsievert deleted the resize branch October 14, 2022 18:25
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.

2 participants