Skip to content

Commit

Permalink
Merge 6e10498
Browse files Browse the repository at this point in the history
  • Loading branch information
syrel committed Mar 26, 2024
2 parents fa157bf + 6e10498 commit ab794e4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/Bloc/BlElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3973,6 +3973,14 @@ BlElement >> width: aNumber [
c horizontal exact: aNumber ]
]

{ #category : #'children accessing' }
BlElement >> withAllChildren [
"Return a collection of all children including myself starting with me and ending with the bottom most child"
<return: #Array of: #BlElement>

^ Array streamContents: [ :aStream | self withAllChildrenDepthFirstDo: [ :eachParent | aStream nextPut: eachParent ] ]
]

{ #category : #'api - children enumeration' }
BlElement >> withAllChildrenAt: aPoint [
<return: #Collection of: #BlElement>
Expand Down Expand Up @@ -4035,6 +4043,15 @@ BlElement >> withAllChildrenBreadthFirstDo: aBlock [
self allChildrenBreadthFirstDo: aBlock
]

{ #category : #'children accessing' }
BlElement >> withAllChildrenDepthFirstDo: aBlock [
"Evaluate a block with me and all my children as an argument starting from me
up to the bottom most child"

aBlock value: self.
self allChildrenDepthFirstDo: aBlock
]

{ #category : #'api - children enumeration' }
BlElement >> withAllLeafChildrenAt: aPoint [
<return: #Collection of: #BlElement>
Expand Down
3 changes: 2 additions & 1 deletion src/BlocHost-Morphic/BlBlocUIManagerNotification.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ BlBlocUIManagerNotification >> isFromMorphic [
ifTrue: [ ^ false ].
context := thisContext.
[ context notNil ]
whileTrue: [ (context receiver isKindOf: worldMorphClass)
whileTrue: [
(context receiver class includesBehavior: worldMorphClass)
ifTrue: [ ^ true ].
context := context sender ].
^ false
Expand Down

0 comments on commit ab794e4

Please sign in to comment.