Implement behavioral logic
Closed this issue · 0 comments
thomaspeugeot commented
Steps:
- add a
Impl
field toRect
- add a package "bahavior"
- add a
RectOrchestratorImpl
struct with methodfunc AfterUpdateFromFront(stage *gongsvg_models.StageStruct, stagedRect, backRepoRect *gongsvg_models.Rect)
that callsstagedRect.Impl.AfterUpdateFromFront(stage *gongsvg_models.StageStruct, stagedRect, backRepoRect *Rect)
- add a
RectImpl
struct that implementsAfterUpdateFromFront(stage *gongsvg_models.StageStruct, stagedRect, backRepoRect *gongsvg_models.Rect)
- add a function
Connect(stage *gongsvg_models.StageStruct)
to plug the RectImpl to the Rect and that hooks Stage.AfterUpdateFromFront to RectOrchestratorImpl
In the behavior
function
- Add ShowHorizontalHandles and allow Handles to appears only if true
- Add CanHaveHorizontalHandles and set ShowHorizontalHandles to true if Selected and CanHaveHorizontalHandles
- Add CanBeMovedHorizontally
- Add CanBeMovedVertically
- Allow a control inversion via a RectUpdated(stagedRect, backRepoRect *gongsvg_models.Rect)