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)

This commit is contained in:
chfhtw
2026-04-22 09:37:50 +02:00
parent 95d85c7f5b
commit 5571353464
+8
View File
@@ -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) => {