Skip to content

Commit

Permalink
fix negative inset
Browse files Browse the repository at this point in the history
  • Loading branch information
lkzhao committed Aug 18, 2021
1 parent a005213 commit 3c0930d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/UIComponent/Components/Layout/Inset/Insets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct InsetsRenderNode: RenderNode {
[CGPoint(x: insets.left, y: insets.top)]
}
func views(in frame: CGRect) -> [Renderable] {
child.views(in: frame.inset(by: -insets)).map {
child.views(in: frame.offsetBy(dx: -insets.left, dy: -insets.top)).map {
Renderable(id: $0.id,
keyPath: "inset." + $0.keyPath,
animator: $0.animator, renderNode: $0.renderNode, frame: $0.frame + CGPoint(x: insets.left, y: insets.top))
Expand Down

0 comments on commit 3c0930d

Please sign in to comment.