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

Introduce viewDocument#layoutChanged event. #4367

Closed
oskarwrobel opened this issue Jun 25, 2018 · 0 comments · Fixed by ckeditor/ckeditor5-engine#1446
Closed

Introduce viewDocument#layoutChanged event. #4367

oskarwrobel opened this issue Jun 25, 2018 · 0 comments · Fixed by ckeditor/ckeditor5-engine#1446
Assignees
Milestone

Comments

@oskarwrobel
Copy link
Contributor

Now we use view#render event to know that editor layout has changed. The UI uses this event to keep floating stuff properly displayed after all view changes. The problem is that render event is fired and should only be fired along with the view rendering process but unfortunately rendering is not the only way to change the layout. E.g. layout can change as a result of resizing

jun-25-2018 16-17-35

or when the source of the <img/> element is loaded async https://github.com/ckeditor/ckeditor5-image/issues/142 and it can be more and more reasons.

We decided to introduce viewDocument#layoutChanged event. This event should be fired after each view#render (we can consider to reduce the event frequency using throttle function), besides can be fired every time when lyout has changed other way than the view rendering.

@oskarwrobel oskarwrobel self-assigned this Jun 25, 2018
pjasiun referenced this issue in ckeditor/ckeditor5-engine Jun 26, 2018
Feature: Introduced `ViewDocument#layoutChanged` event. Closes #1445.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 19 milestone Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants