Add missing file, workaround for placement positions bug

This commit is contained in:
2022-03-08 07:59:36 +00:00
parent 79b5241c32
commit 59e6f433ff
16 changed files with 67 additions and 86 deletions
+3 -3
View File
@@ -12,10 +12,10 @@ shiftPSBy (pos,rot) ps = ps
& psRot +~ rot
shiftPlacement :: (Point2,Float) -> Placement -> Placement
shiftPlacement shift plmnt = case plmnt of
-- slightly messy NoShiftCont, necessary to stop interference with ps0jPushPS
Placement {_plSpot = PSNoShiftCont {}} -> plmnt & plSpot %~ shiftPSBy shift
Placement {} -> plmnt & plSpot %~ shiftPSBy shift
-- TODO check whether the following continuation is ever necessary
-- it can interfere with ps0jPushPS
-- & plIDCont %~ fmap (fmap $ shiftPlacement shift)
& plIDCont %~ fmap (fmap $ shiftPlacement shift)
PlacementUsingPos p f -> PlacementUsingPos (shiftPoint3By shift p)
(fmap (shiftPlacement shift) f)
RandomPlacement rpl -> RandomPlacement $ fmap (shiftPlacement shift) rpl