throttle take 3
This commit is contained in:
parent
6ecd843df2
commit
203de10249
@ -6448,10 +6448,16 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
isExporting: false,
|
isExporting: false,
|
||||||
renderScrollbars: !this.device.isMobile,
|
renderScrollbars: !this.device.isMobile,
|
||||||
};
|
};
|
||||||
renderingElements.forEach((el) =>
|
let i = 0;
|
||||||
setTimeout(() => generateElementWithCanvas(el, renderConfig)),
|
for (; i < renderingElements.length; i += 200) {
|
||||||
|
const chunk = renderingElements.slice(i, i + 200);
|
||||||
|
setTimeout(
|
||||||
|
() =>
|
||||||
|
chunk.forEach((el) => generateElementWithCanvas(el, renderConfig)),
|
||||||
|
i * 50,
|
||||||
);
|
);
|
||||||
setTimeout(() => this.setState({ shouldCacheIgnoreZoom: false }));
|
}
|
||||||
|
setTimeout(() => this.setState({ shouldCacheIgnoreZoom: false }), i * 50);
|
||||||
}
|
}
|
||||||
}, 300);
|
}, 300);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user