From bb8dc530131af4e7818851de4938ea88eb9b8eda Mon Sep 17 00:00:00 2001 From: Luke Zhao Date: Tue, 14 May 2024 10:38:43 -0700 Subject: [PATCH] add frame method for RenderNodeChild --- .../UIComponent/Core/Model/RenderNode/RenderNodeChild.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/UIComponent/Core/Model/RenderNode/RenderNodeChild.swift b/Sources/UIComponent/Core/Model/RenderNode/RenderNodeChild.swift index d8dfeec..aee1eb5 100644 --- a/Sources/UIComponent/Core/Model/RenderNode/RenderNodeChild.swift +++ b/Sources/UIComponent/Core/Model/RenderNode/RenderNodeChild.swift @@ -26,3 +26,9 @@ public struct RenderNodeChild { self.index = index } } + +extension RenderNodeChild { + public var frame: CGRect { + CGRect(origin: position, size: renderNode.size) + } +}