Make dragging behaviour consistent when dragging up and down
This causes a slight gap when dragging backwards and forwards over large items
This commit is contained in:
@@ -251,13 +251,13 @@ shiftInvItems k x ab bn xs ss w = fromMaybe w $ do
|
||||
then do
|
||||
above <- ss ^? ix (mini - 1)
|
||||
guard $ Just (k,mini-1) /= ab
|
||||
-- minss <- IM.lookupMin ss
|
||||
-- guard (mini > fst minss)
|
||||
return $ shiftInvItemsUp k xs w
|
||||
else do
|
||||
guard $ x > (k,maxi)
|
||||
maxss <- IM.lookupMax ss
|
||||
guard (maxi < fst maxss)
|
||||
--guard $ x > (k,maxi)
|
||||
--maxss <- IM.lookupMax ss
|
||||
--guard (maxi < fst maxss)
|
||||
_ <- ss ^? ix (maxi + 1)
|
||||
guard $ Just (k,maxi+1) < bn
|
||||
return $ shiftInvItemsDown k xs w
|
||||
|
||||
shiftInvItemsUp :: Int -> IS.IntSet -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user