mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 03:21:29 +00:00
Fix ASTextNode positioning for non-left alignment, part deux.
Apply the fix from #329 to `-setFrame:`. Fixes #89.
This commit is contained in:
parent
1dc4b42dce
commit
8164d63d29
@ -234,6 +234,18 @@ ASDISPLAYNODE_INLINE CGFloat ceilPixelValue(CGFloat f)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setFrame:(CGRect)frame
|
||||
{
|
||||
[super setFrame:frame];
|
||||
if (!CGSizeEqualToSize(frame.size, _constrainedSize)) {
|
||||
// Our bounds have changed to a size that is not identical to our constraining size,
|
||||
// so our previous layout information is invalid, and TextKit may draw at the
|
||||
// incorrect origin.
|
||||
_constrainedSize = CGSizeMake(-INFINITY, -INFINITY);
|
||||
[self _invalidateRenderer];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setBounds:(CGRect)bounds
|
||||
{
|
||||
[super setBounds:bounds];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user