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:
commit
e9b074fde3
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue