Skip to content
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

Fix: Node size not updated when node size changed on DOM #71

Merged
merged 1 commit into from
Jan 18, 2020

Conversation

zetavg
Copy link

@zetavg zetavg commented Dec 9, 2019

el.offsetWidth and el.offsetHeight should be checked against node.size.width and node.size.height (which comes from chartData) rather then size.width and size.height (which is the local state).

size.width and size.height is set by ResizeObserver, which will always be equal with el.offsetWidth and el.offsetHeight at this place, while this side effect being triggered by ResizeObserver.

el.offsetWidth and el.offsetHeight should be checked against node.size.width and node.size.height (which comes from chartData) rather then size.width and size.height (which is the local state). size.width and size.height is set by ResizeObserver, which will always be equal with el.offsetWidth and el.offsetHeight at this place, while this side effect being triggered by ResizeObserver.
@MrBlenny MrBlenny merged commit 1f7358c into MrBlenny:master Jan 18, 2020
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.

None yet

3 participants