diff --git a/Sources/UIComponent/Components/Layout/Stack/StackRenderNode.swift b/Sources/UIComponent/Components/Layout/Stack/StackRenderNode.swift index 0681fd7..fff9841 100644 --- a/Sources/UIComponent/Components/Layout/Stack/StackRenderNode.swift +++ b/Sources/UIComponent/Components/Layout/Stack/StackRenderNode.swift @@ -58,6 +58,13 @@ public struct HorizontalRenderNode: StackRenderNode, HorizontalLayoutProtocol { public var shouldRenderView: Bool { false } + + public init(size: CGSize, children: [any RenderNode], positions: [CGPoint], mainAxisMaxValue: CGFloat) { + self.size = size + self.children = children + self.positions = positions + self.mainAxisMaxValue = mainAxisMaxValue + } } /// A type of render node that is optimized for vertical layout. @@ -76,6 +83,13 @@ public struct VerticalRenderNode: StackRenderNode, VerticalLayoutProtocol { public var shouldRenderView: Bool { false } + + public init(size: CGSize, children: [any RenderNode], positions: [CGPoint], mainAxisMaxValue: CGFloat) { + self.size = size + self.children = children + self.positions = positions + self.mainAxisMaxValue = mainAxisMaxValue + } } /// A type of render node for generic layout use