Skip to content

Commit 167ad67

Browse files
committed
zero size is default for sizeToFit in generic nodes
1 parent c4b5b96 commit 167ad67

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

LayoutOps/LayoutOps/Node.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public class AnyNode: Layoutable {
7070
public var frame: CGRect = CGRect()
7171

7272
public func sizeThatFits(size: CGSize) -> CGSize {
73-
return size
73+
return CGSize()
7474
}
7575

7676
private var subnodes: [AnyNode]

LayoutOps/LayoutOps/UIView+Layoutable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extension CALayer: Layoutable {
3434
}
3535

3636
public func sizeThatFits(size: CGSize) -> CGSize {
37-
return size
37+
return CGSize()
3838
}
3939
}
4040

0 commit comments

Comments
 (0)