Continue work on using links for placement positions
This commit is contained in:
+4
-5
@@ -64,13 +64,12 @@ assignPlacementSpots rm = plmnts ++ plmnts'
|
||||
(lnkplmnts, plmnts) = partition islnk (_rmPS rm)
|
||||
islnk Placement{_placementSpot=PSLnk{}} = True
|
||||
islnk _ = False
|
||||
(_,plmnts') = mapAccumR f (_rmLinks rm) lnkplmnts
|
||||
(la,lb) = head $ _rmUsedLinks rm
|
||||
lnkTo = (la,lb+1.5*pi)
|
||||
(_,plmnts') = mapAccumR f (map (invShiftLinkBy lnkTo) $ _rmLinks rm) lnkplmnts
|
||||
(la,lb) = _rmShift rm
|
||||
lnkTo = (la,lb)
|
||||
f lnks plmnt =
|
||||
let (x:xs,ys) = partition (_psLinkTest $ _placementSpot plmnt) lnks
|
||||
thepair = bimap (invShiftPointBy lnkTo) (\r -> r - snd lnkTo)
|
||||
$ _psLinkShift (_placementSpot plmnt) x
|
||||
thepair = _psLinkShift (_placementSpot plmnt) x
|
||||
in (xs++ys, updatePS (updatePSLnkUsing thepair) plmnt)
|
||||
|
||||
updatePSLnkUsing :: (Point2,Float) -> PlacementSpot -> PlacementSpot
|
||||
|
||||
Reference in New Issue
Block a user