From 557135346459906447c3e8fd2e23722c52d6769c Mon Sep 17 00:00:00 2001 From: chfhtw Date: Wed, 22 Apr 2026 09:37:50 +0200 Subject: [PATCH] let items jump over pinned items (this may be especially relevant if pinned items trap one or more items involved in a drag and drop operation) --- public/js/composables/GridLogic.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/js/composables/GridLogic.js b/public/js/composables/GridLogic.js index c5bc99597..9f5b96ba6 100644 --- a/public/js/composables/GridLogic.js +++ b/public/js/composables/GridLogic.js @@ -57,6 +57,14 @@ class GridLogic { item.frame.forEach(f => intermGrid.grid[f] = -1); + intermGrid.data.forEach(currItem => { + if (currItem.pinned) { + if (!currItem.frame) + currItem.frame = intermGrid.getItemFrame(currItem); + currItem.frame.forEach(f => intermGrid.grid[f] = -1); + } + }); + const possiblities = intermGrid.tryMoving(occupiers, prefer); if (possiblities.length) { const bestOption = possiblities.sort((a,b) => {