Skip to content

Commit

Permalink
Update render from styles when style changes in owner
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Nov 13, 2024
1 parent 7ce6832 commit e6e7f1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
12 changes: 6 additions & 6 deletions repository/OpenPonk-Core/OPDiagram.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OPDiagram class >> stonAllInstVarNames [
^ super stonAllInstVarNames , #( #name #documentation #resolution )
]

{ #category : 'as yet unclassified' }
{ #category : 'accessing' }
OPDiagram >> canvas: aCanvas [

self isRendered ifTrue: [
Expand All @@ -44,7 +44,7 @@ OPDiagram >> documentation: anObject [
documentation := anObject
]

{ #category : 'as yet unclassified' }
{ #category : 'testing' }
OPDiagram >> isPositionableByUser [

^ false
Expand All @@ -56,21 +56,21 @@ OPDiagram >> isRendered [
^ roassalShape isNotNil
]

{ #category : 'as yet unclassified' }
{ #category : 'testing' }
OPDiagram >> isResizableByUser [

^ false
]

{ #category : 'as yet unclassified' }
{ #category : 'accessing' }
OPDiagram >> modelElementName [

^ (self modelElement respondsTo: #name)
ifTrue: [ self modelElement name ]
ifFalse: [ self modelElementType ]
]

{ #category : 'as yet unclassified' }
{ #category : 'accessing' }
OPDiagram >> modelElementType [

^ self modelElement className
Expand Down Expand Up @@ -130,7 +130,7 @@ OPDiagram >> resolution: anObject [
resolution := anObject
]

{ #category : 'as yet unclassified' }
{ #category : 'rendering' }
OPDiagram >> updateFromRender [

self bounds: (OPNodeBounds
Expand Down
12 changes: 5 additions & 7 deletions repository/OpenPonk-Core/OPDiagramElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,22 @@ OPDiagramElement >> addSelectionDraggableInteraction [
roassalShape @ OPRSSelectionDraggable
]

{ #category : 'as yet unclassified' }
{ #category : 'rendering' }
OPDiagramElement >> addedByMouseClickTo: aPoint [

"Do nothing by default. The given point is position where user clicked by mouse in order to create the element. If the shape was not added by a mouse click, this method is not called. May be overriden to translate to that position or react in any other way."


]

{ #category : 'as yet unclassified' }
{ #category : 'enumerating' }
OPDiagramElement >> allOwnedShapesPositionableByUser [

self isRendered ifFalse: [ ^ #( ) ].
^ self ownedElements flatCollect: #allOwnedShapesPositionableByUser
]

{ #category : 'as yet unclassified' }
{ #category : 'enumerating' }
OPDiagramElement >> allShapesPositionableByUser [

^ self topMostOwningElement allOwnedShapesPositionableByUser
Expand Down Expand Up @@ -510,7 +510,7 @@ OPDiagramElement >> roassalShape [
^ roassalShape
]

{ #category : 'as yet unclassified' }
{ #category : 'rendering' }
OPDiagramElement >> roassalShapeUnsubscribe: aSubscriber [

roassalShape ifNil: [ ^ self ].
Expand Down Expand Up @@ -705,7 +705,5 @@ OPDiagramElement >> updateRenderFromSelf [
{ #category : 'initialization' }
OPDiagramElement >> updateRenderFromStyles [

"do nothing by default"


self ownedElements select: #isRendered thenDo: #updateRenderFromStyles
]

0 comments on commit e6e7f1e

Please sign in to comment.