Skip to content

Commit

Permalink
BlElement:
Browse files Browse the repository at this point in the history
+ hasAnyInParentChain:
+ hasInParentChain:
  • Loading branch information
plantec committed Jun 23, 2023
1 parent 0e0168d commit 103b733
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Bloc/BlElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,15 @@ BlElement >> globalScale [
^ (aGlobalOrigin distanceTo: aGlobalCorner) / (anOrigin distanceTo: aCorner)
]

{ #category : #'children testing' }
BlElement >> hasAnyInParentChain: aCollection [
"Return true if any one in the given collection in my parent chain (including myself) "
<return: #Boolean>


^ aCollection anySatisfy: [ :e | self hasInParentChain: e ]
]

{ #category : #'children testing' }
BlElement >> hasChild: anElement [
<return: #Boolean>
Expand Down Expand Up @@ -1803,6 +1812,14 @@ BlElement >> hasFocusable [
self children anySatisfy: [ :anElement | anElement hasFocusable ] ]
]

{ #category : #'children testing' }
BlElement >> hasInParentChain: anElement [
"Return true if I have a given element in my parent chain, or if I am anElement "
<return: #Boolean>

^ anElement = self or: [ self hasParent: anElement ]
]

{ #category : #'event management accessing' }
BlElement >> hasNextEventTarget [
"Return true if this event target has a logical successor within a dispatch chain.
Expand Down
6 changes: 6 additions & 0 deletions src/Bloc/BlSpaceMouseDownOutsideEvent.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ BlSpaceMouseDownOutsideEvent >> originalEvent: aBlEvent [
aBlEvent consumed: true.
originalEvent := aBlEvent
]

{ #category : #sending }
BlSpaceMouseDownOutsideEvent >> sendTo: anObject [

anObject mouseDownOutsideEvent: self
]

0 comments on commit 103b733

Please sign in to comment.