mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-05-18 09:59:46 +08:00
Round up editable text node to the next point (#1761)
Rounding up to the next device pixel was calculating a height smaller than UITextView's contentSize. This was causing the baseline to move as the user was typing.
This commit is contained in:
@@ -192,8 +192,7 @@
|
||||
{
|
||||
ASTextKitComponents *displayedComponents = [self isDisplayingPlaceholder] ? _placeholderTextKitComponents : _textKitComponents;
|
||||
CGSize textSize = [displayedComponents sizeForConstrainedWidth:constrainedSize.width];
|
||||
textSize = ceilSizeValue(textSize);
|
||||
return CGSizeMake(fminf(textSize.width, constrainedSize.width), fminf(textSize.height, constrainedSize.height));
|
||||
return CGSizeMake(fminf(ceilf(textSize.width), constrainedSize.width), fminf(ceilf(textSize.height), constrainedSize.height));
|
||||
}
|
||||
|
||||
- (void)layout
|
||||
|
||||
Reference in New Issue
Block a user