Skip to content

Commit

Permalink
Merge 2f8eb41
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Aug 31, 2021
2 parents 94b157a + 2f8eb41 commit b32b0e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions repository/OpenPonk-Roassal2/OPInteractiveLine.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ OPInteractiveLine >> remove [

{ #category : #hooks }
OPInteractiveLine >> renderIn: aView [

view := aView.

mouseBox := RTBox new
size: 0;
color: Color transparent;
element.
size: 2;
color: Color transparent;
element.

line := lineBuilder value: source value: mouseBox.
" line shape color: Color veryLightGray."
" line shape color: Color veryLightGray."

mouseBox translateTo: source position.
aView add: mouseBox.
Expand All @@ -64,10 +65,10 @@ OPInteractiveLine >> renderIn: aView [
aView signalUpdate.

moveSubscription := aView announcer
when: TRMouseMove
do: [ :event |
mouseBox translateTo: event position.
aView signalUpdate ].
when: TRMouseMove
do: [ :event |
mouseBox translateTo: event position.
aView signalUpdate ].

running := true
]
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ OPRTEdgeAlongConstraint >> fix [
to: endPoint.
positionVector := shape position - nearestPoint.
edgeVectorR := edgeVector r.
offset := shape position dist: nearestPoint.
offset := shape position distanceTo: nearestPoint.
(edgeVector + positionVector rightRotated) r > edgeVectorR ifTrue: [
offset := offset negated ].
edgeVectorR < 5
Expand Down

0 comments on commit b32b0e5

Please sign in to comment.