mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 11:25:38 +00:00
Merge pull request #329 from ocrickard/master
Fix text node positioning for non-left alignment
This commit is contained in:
commit
ea13585ab0
@ -234,6 +234,18 @@ ASDISPLAYNODE_INLINE CGFloat ceilPixelValue(CGFloat f)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)setBounds:(CGRect)bounds
|
||||||
|
{
|
||||||
|
[super setBounds:bounds];
|
||||||
|
if (!CGSizeEqualToSize(bounds.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];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Renderer Management
|
#pragma mark - Renderer Management
|
||||||
|
|
||||||
- (ASTextNodeRenderer *)_renderer
|
- (ASTextNodeRenderer *)_renderer
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user