Skip to content

Commit

Permalink
Enlarged clickable zones of lines
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Nov 6, 2024
1 parent 2ce7bca commit 905d94a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 12 deletions.
10 changes: 4 additions & 6 deletions repository/OpenPonk-Core/OPDiagram.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ OPDiagram >> canvas: aCanvas [
self
assert: roassalShape canvas = aCanvas
description:
'Reusing same diagram element for 2 canvases not allowed'.
^ false ].
'Reusing same diagram element for 2 canvases not allowed' ].
roassalShape := aCanvas.
^ true
self updateRenderFromSelf
]

{ #category : 'accessing' }
Expand Down Expand Up @@ -89,10 +88,9 @@ OPDiagram >> name: anObject [
]

{ #category : 'as yet unclassified' }
OPDiagram >> ownedElement: aShape renderedIn: aCanvas [
OPDiagram >> ownedElement: aShape willRenderIn: aCanvas [

(self canvas: aCanvas) ifFalse: [ ^ self ].
self updateRenderFromSelf
self canvas: aCanvas
]

{ #category : 'rendering' }
Expand Down
15 changes: 10 additions & 5 deletions repository/OpenPonk-Core/OPDiagramElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,19 @@ OPDiagramElement >> ownModelElement [

{ #category : 'initialization' }
OPDiagramElement >> ownedElement: aShape renderedIn: aCanvas [
"do nothing"


]

{ #category : 'initialization' }
OPDiagramElement >> ownedElement: aShape willRenderIn: aCanvas [

self isRendered ifTrue: [
self
assert: roassalShape canvas = aCanvas
description:
'Reusing same diagram element for 2 canvases not allowed'.
^ self owningElement ifExists: [ :owner |
owner ownedElement: aShape renderedIn: aCanvas ] ].
'Reusing same diagram element for 2 canvases not allowed' ].
self renderIn: aCanvas
]

Expand Down Expand Up @@ -447,6 +452,7 @@ OPDiagramElement >> renderBasicShapeIn: aCanvas [
OPDiagramElement >> renderIn: aCanvas [

self isRendered ifTrue: [ ^ self ].
self owningElement ownedElement: self willRenderIn: aCanvas.
self renderBasicShapeIn: aCanvas.
self renderShapeDetails.
self addInteractions.
Expand All @@ -455,8 +461,7 @@ OPDiagramElement >> renderIn: aCanvas [
self updateRenderFromModel.
self updateRenderFromStyles.
self updateRenderFromSelf.
self owningElement ifExists: [ :element |
element ownedElement: self renderedIn: self canvas ].
self owningElement ownedElement: self renderedIn: aCanvas.
^ roassalShape
]

Expand Down
14 changes: 14 additions & 0 deletions repository/OpenPonk-Core/OPNoShape.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@ OPNoShape >> modelElement [
^ nil
]

{ #category : 'initialization' }
OPNoShape >> ownedElement: anOPPetriNetPTPlaceShape renderedIn: aRSCanvas [
"do nothing"


]

{ #category : 'initialization' }
OPNoShape >> ownedElement: anOPPetriNetPTPlaceShape willRenderIn: aRSCanvas [
"do nothing"


]

{ #category : 'accessing' }
OPNoShape >> ownedElements [

Expand Down
2 changes: 1 addition & 1 deletion repository/OpenPonk-Roassal/OPRSPolyline.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Class {
{ #category : 'as yet unclassified' }
OPRSPolyline >> includedRadius [

^ super includedRadius + 2
^ super includedRadius + 1.5 + (2.5 / self canvas camera scale)
]

0 comments on commit 905d94a

Please sign in to comment.