summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2024-04-30 08:35:54 -0400
committerHenry Castro <hcastro@collabora.com>2024-05-02 08:15:53 -0400
commit273e9c15a8f91c7a6ad85ad12d703a4946c2f70a (patch)
tree224b83903f1397c556042e700ec0205ffb3a4652
parentbrowser: preview: update 'createPreview' function (diff)
downloadonline-273e9c15a8f91c7a6ad85ad12d703a4946c2f70a.tar.gz
online-273e9c15a8f91c7a6ad85ad12d703a4946c2f70a.zip
browser: preview: simplifiy _resize function
The _onScroll request the visible previews. .. Change-Id: Ib5370f1790b489edb4626a22bf6c5bb1cd8d0f17 Signed-off-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--browser/src/control/Control.PartsPreview.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/browser/src/control/Control.PartsPreview.js b/browser/src/control/Control.PartsPreview.js
index 9a7e4c1498..b898a9538b 100644
--- a/browser/src/control/Control.PartsPreview.js
+++ b/browser/src/control/Control.PartsPreview.js
@@ -569,8 +569,8 @@ L.Control.PartsPreview = L.Control.extend({
return;
if (this._previewInitialized) {
- this._invalidateParts();
- this._map._processPreviewQueue();
+ clearInterval(this._resizeTimer);
+ this._resizeTimer = setInterval(L.bind(this._onScroll, this), 50);
}
this._height = window.innerHeight;