@@ -24,7 +24,6 @@ import Potato.Flow.Types
2424import Potato.Flow.OwlItem
2525import Potato.Flow.Owl
2626import Potato.Flow.OwlState
27- import Potato.Flow.OwlWorkspace
2827import Potato.Flow.Methods.Types
2928import Potato.Flow.Llama
3029import Potato.Flow.Methods.LlamaWorks
@@ -187,7 +186,7 @@ makeDragDeltaBox bht rmd = r where
187186-- reduces the DeltaLBox such that the LBox does not invert
188187-- assumes LBox is canonical and that LBox is not already smaller than the desired constrained size
189188constrainDeltaLBox :: Int -> DeltaLBox -> LBox -> DeltaLBox
190- constrainDeltaLBox minsize d1@ (DeltaLBox (V2 dx dy) (V2 dw dh)) d2 @ (( LBox ( V2 x y) (V2 w h) )) = r where
189+ constrainDeltaLBox minsize d1@ (DeltaLBox (V2 dx dy) (V2 dw dh)) ( LBox _ (V2 w h)) = r where
191190 optuple e = (e, - e)
192191
193192 (ndx, ndw) = if dx /= 0
@@ -231,12 +230,13 @@ makeDragOperation :: PotatoHandlerInput -> DeltaLBox -> Maybe Llama
231230makeDragOperation phi dbox = op where
232231 selection = transformableSelection phi
233232 selectionl = toList $ transformableSelection phi
234- pfs = _potatoHandlerInput_pFState phi
235- lboxes = fmap (\ sowl -> _sEltDrawer_box (getDrawer . hasOwlItem_toOwlSubItem $ sowl) pfs) selectionl
236-
233+
234+
237235 -- go through each element in selection and ensure that dbox does not invert that element
238236 -- DANGER you need to make sure you have sensible bounding box functions or you might put things in a non-resizeable state
239- constraineddbox = foldl' (constrainDeltaLBox 0 ) dbox lboxes
237+ -- pfs = _potatoHandlerInput_pFState phi
238+ -- lboxes = fmap (\sowl -> _sEltDrawer_box (getDrawer . hasOwlItem_toOwlSubItem $ sowl) pfs) selectionl
239+ -- constraineddbox = foldl' (constrainDeltaLBox 0) dbox lboxes
240240
241241 makeController _ = cmd where
242242 cmd = CTagBoundingBox :=> (Identity $ CBoundingBox {
0 commit comments