avoid requestIdleCallback as it is not supported on Safari and IE11

This commit is contained in:
Bruno Windels 2021-09-13 14:53:34 +02:00
parent 8858cffc55
commit ecccadb77e

View File

@ -55,7 +55,7 @@ export class TimelineViewModel extends ViewModel {
this._requestedStartTile = startTile; this._requestedStartTile = startTile;
this._requestedEndTile = endTile; this._requestedEndTile = endTile;
if (!this._requestScheduled) { if (!this._requestScheduled) {
requestIdleCallback(() => { Promise.resolve().then(() => {
this._setVisibleTileRange(this._requestedStartTile, this._requestedEndTile); this._setVisibleTileRange(this._requestedStartTile, this._requestedEndTile);
this._requestScheduled = false; this._requestScheduled = false;
}); });