From f74be9a79125e5c84b903c3f0bbaa0e9b14ce695 Mon Sep 17 00:00:00 2001 From: Jan Bliznicenko Date: Sun, 15 Oct 2023 13:14:14 +0200 Subject: [PATCH] reworked RS interactions --- .../OPFsmAbstractStateShape.class.st | 32 ++++++++----------- .../OPFsmInitialStateShape.class.st | 7 ++-- .../OpenPonk-FSM/OPFsmStateShape.class.st | 7 ++-- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/repository/OpenPonk-FSM/OPFsmAbstractStateShape.class.st b/repository/OpenPonk-FSM/OPFsmAbstractStateShape.class.st index b5d44b4..e593eb2 100644 --- a/repository/OpenPonk-FSM/OPFsmAbstractStateShape.class.st +++ b/repository/OpenPonk-FSM/OPFsmAbstractStateShape.class.st @@ -16,26 +16,22 @@ OPFsmAbstractStateShape >> adornmentCreationBlock: aBlock [ adornmentCreationBlock := aBlock ] -{ #category : #rendering } -OPFsmAbstractStateShape >> renderShapeDetails [ +{ #category : #hooks } +OPFsmAbstractStateShape >> selectableInteraction [ - | selectable | - selectable := OPRSSelectable new. - self setupHighlight: selectable. - self roassalShape @ selectable. - self roassalShape @ OPRSSelectionDraggable + ^ OPRSSelectable highlightAdornments: [ :builder | + builder horizontalLocation + outer; + right. + builder verticalLocation + inner; + middle. + builder directionDown. + adornmentCreationBlock value: builder ] ] -{ #category : #hooks } -OPFsmAbstractStateShape >> setupHighlight: aHighlightable [ +{ #category : #rendering } +OPFsmAbstractStateShape >> shouldBePositionableByUser [ - aHighlightable highlightAdornments: [ :builder | - builder horizontalLocation - outer; - right. - builder verticalLocation - inner; - middle. - builder directionDown. - adornmentCreationBlock value: builder ] + ^ true ] diff --git a/repository/OpenPonk-FSM/OPFsmInitialStateShape.class.st b/repository/OpenPonk-FSM/OPFsmInitialStateShape.class.st index 04dfca5..3fafbb8 100644 --- a/repository/OpenPonk-FSM/OPFsmInitialStateShape.class.st +++ b/repository/OpenPonk-FSM/OPFsmInitialStateShape.class.st @@ -16,8 +16,9 @@ OPFsmInitialStateShape >> renderBasicShape [ ] { #category : #hooks } -OPFsmInitialStateShape >> setupHighlight: aHighlightable [ +OPFsmInitialStateShape >> selectableInteraction [ - super setupHighlight: aHighlightable. - aHighlightable highlightColor: Color blue + ^ super selectableInteraction + highlightColor: Color blue; + yourself ] diff --git a/repository/OpenPonk-FSM/OPFsmStateShape.class.st b/repository/OpenPonk-FSM/OPFsmStateShape.class.st index 420fb72..7448e1e 100644 --- a/repository/OpenPonk-FSM/OPFsmStateShape.class.st +++ b/repository/OpenPonk-FSM/OPFsmStateShape.class.st @@ -60,10 +60,11 @@ OPFsmStateShape >> renderShapeDetails [ ] { #category : #hooks } -OPFsmStateShape >> setupHighlight: aHighlightable [ +OPFsmStateShape >> selectableInteraction [ - super setupHighlight: aHighlightable. - aHighlightable highlightBorderColor: Color blue + ^ super selectableInteraction + highlightBorderColor: Color blue; + yourself ] { #category : #updating }