Skip to content

Commit

Permalink
Construct ComponentGroup from width and height
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Jun 6, 2024
1 parent 0c46e8e commit c4ef572
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ object ComponentGroup:
dirty = true
)

def apply[ReferenceData](width: Int, height: Int): ComponentGroup[ReferenceData] =
ComponentGroup(Dimensions(width, height))

given [ReferenceData]: Component[ComponentGroup[ReferenceData], ReferenceData] with

def bounds(reference: ReferenceData, model: ComponentGroup[ReferenceData]): Bounds =
Expand Down

0 comments on commit c4ef572

Please sign in to comment.