mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
!some(!true) is the same as every(true) and we don't need to check for the originalFrame since only the moving item was in there and no other item hence no occupier
This commit is contained in:
@@ -120,7 +120,8 @@ class GridLogic {
|
||||
// checks if target contains widget with the same high and width
|
||||
let occupiersData = occupiers.map(occupier => this.data[occupier]);
|
||||
let occupiersFrame = occupiersData.map(occupier => occupier.frame).flat();
|
||||
if (!occupiersFrame.some(frame => !currItem.frame.includes(frame)) && !occupiersFrame.some(frame => originalFrame.includes(frame))){
|
||||
if (occupiersFrame.every(frame => currItem.frame.includes(frame))) {
|
||||
// every slot of all items in the target zone is inside said zone
|
||||
let replaceUpdate = [];
|
||||
let newOccupierFrames = [];
|
||||
for(let f of originalFrame){
|
||||
|
||||
Reference in New Issue
Block a user