mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 17:02:19 +00:00
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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user