Skip to content

Commit

Permalink
Nicer API for newScrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducasse committed Jan 9, 2025
1 parent c425f3a commit 3614453
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Bloc-Infinite/BlElement.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ Extension { #name : #BlElement }

{ #category : #'*Bloc-Infinite' }
BlElement >> asScrollableElement [
| scrollable |
| scrollableParent |
self removeFromParent.
scrollable := self newScrollableParent.
scrollable constraintsDo: [ :c |
scrollableParent := self newScrollable.
scrollableParent constraintsDo: [ :c |
c horizontal matchParent.
c vertical matchParent ].
scrollable addChild: self.
^ scrollable
scrollableParent addChild: self.
^ scrollableParent
]

{ #category : #'*Bloc-Infinite' }
BlElement >> newScrollableParent [
BlElement >> newScrollable [

^ BlScrollableElement new
]

0 comments on commit 3614453

Please sign in to comment.