mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Run resizeCheck in requestAnimationFrame for ResizeObserver
This commit is contained in:
parent
7ebbe01bf4
commit
ba213ceb8a
1 changed files with 1 additions and 1 deletions
|
@ -526,7 +526,7 @@ class Contents {
|
||||||
resizeObservers() {
|
resizeObservers() {
|
||||||
// create an observer instance
|
// create an observer instance
|
||||||
this.observer = new ResizeObserver((e) => {
|
this.observer = new ResizeObserver((e) => {
|
||||||
this.resizeCheck();
|
requestAnimationFrame(this.resizeCheck.bind(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
// pass in the target node
|
// pass in the target node
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue