Skip to content

Commit

Permalink
reworked RS interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Oct 15, 2023
1 parent d4b31df commit f74be9a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 24 deletions.
32 changes: 14 additions & 18 deletions repository/OpenPonk-FSM/OPFsmAbstractStateShape.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
7 changes: 4 additions & 3 deletions repository/OpenPonk-FSM/OPFsmInitialStateShape.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
7 changes: 4 additions & 3 deletions repository/OpenPonk-FSM/OPFsmStateShape.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit f74be9a

Please sign in to comment.