From 657be3913265caefa2a949472f45f0c7397b8535 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Sat, 9 May 2026 13:41:08 +0200 Subject: [PATCH] wait for grid to not be dirty until initializing bbox --- copyparty/web/baguettebox.js | 3 +-- copyparty/web/browser.js | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/copyparty/web/baguettebox.js b/copyparty/web/baguettebox.js index ebd951a9..d992a1bc 100644 --- a/copyparty/web/baguettebox.js +++ b/copyparty/web/baguettebox.js @@ -1376,9 +1376,8 @@ window.baguetteBox = (function () { function init(){ - if(thegrid != undefined){ + if(thegrid != undefined && !thegrid.dirty){ thegrid.bagit(); - thegrid.bag_loaded(); } else{ console.log('wait for grid init'); diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 0c57601e..1459cff4 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -6562,11 +6562,8 @@ window.thegrid = (function () { } }); r.bbox_opts = br[1]; - }; - - r.bag_loaded = function () { r.bbox = true; - } + }; r.onhide = function () { afilt.apply();