Various fixes

This commit is contained in:
Ilya Laktyushin
2022-09-21 02:13:36 +03:00
parent 37002ab90d
commit 74af8d17e1
22 changed files with 381 additions and 49 deletions

View File

@@ -141,4 +141,17 @@ open class ListViewItemHeaderNode: ASDisplayNode {
open func updateLayout(size: CGSize, leftInset: CGFloat, rightInset: CGFloat) {
}
open func updateAbsoluteRect(_ rect: CGRect, within containerSize: CGSize) {
}
public func updateFrame(_ frame: CGRect, within containerSize: CGSize, updateFrame: Bool = true) {
if updateFrame {
self.frame = frame
}
if frame.maxY < 0.0 || frame.minY > containerSize.height {
} else {
self.updateAbsoluteRect(frame, within: containerSize)
}
}
}