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

Detect detach/attach in same observation (alt) #9881

Closed
wants to merge 1 commit into from

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented Nov 21, 2021

Alternative to #9876

This approach keeps one observer the whole time and fires attach/detach every time encountered.

pros

  • less duplication
  • every attach / detach is detected
  • should ensure chart is resized if detached and immediately attached to different sized container

cons

  • every attach / detach is detected

@kurkle
Copy link
Member Author

kurkle commented Nov 21, 2021

Filename Size Change
dist/chart.esm.js 73.1 kB +11 B (0%)
dist/chart.js 92.4 kB +12 B (0%)
dist/chart.min.js 65.6 kB -10 B (0%)

@etimberg
Copy link
Member

This change looks ok. I'm not sure which is better compared to #9876

@kurkle
Copy link
Member Author

kurkle commented Nov 22, 2021

As #9876 was verified to be working for at least one use case, I'm closing this in favor of that.

@kurkle kurkle closed this Nov 22, 2021
@kurkle kurkle deleted the datach-attach-alt branch June 29, 2022 10:47
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

2 participants