1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

Merge pull request #1079 from futurepress/resize_observer_async

Run resizeCheck in requestAnimationFrame for ResizeObserver
This commit is contained in:
Fred Chasen 2020-06-09 13:18:51 -07:00 committed by GitHub
commit e9b074fde3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -526,7 +526,7 @@ class Contents {
resizeObservers() {
// create an observer instance
this.observer = new ResizeObserver((e) => {
this.resizeCheck();
requestAnimationFrame(this.resizeCheck.bind(this));
});
// pass in the target node