mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
comments
This commit is contained in:
@@ -186,8 +186,10 @@ typedef CALayer *(^ASDisplayNodeLayerBlock)();
|
||||
@property (nonatomic, readonly, assign) ASSizeRange constrainedSizeForCalculatedLayout;
|
||||
|
||||
/**
|
||||
* @abstract Used by some implementations of measureWithSizeRange: to provide an intrisic content size
|
||||
* to a node when one cannot be computed from its subnodes
|
||||
* @abstract Provides a default intrinsic content size for calculateSizeThatFits:. This is useful when laying out
|
||||
* a node that either has no intrinsic content size or should be laid out at a different size than its intrinsic content
|
||||
* size. For example, this property could be set on an ASImageNode to display at a size different from the underlying
|
||||
* image size.
|
||||
*
|
||||
* @return The preferred frame size of this node
|
||||
*/
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize
|
||||
{
|
||||
ASDN::MutexLocker l(_imageLock);
|
||||
// if a preferredFrameSize is set, call the superclass to return that instead of using the image size.
|
||||
if (CGSizeEqualToSize(self.preferredFrameSize, CGSizeZero) == NO)
|
||||
return [super calculateSizeThatFits:constrainedSize];
|
||||
else if (_image)
|
||||
|
||||
Reference in New Issue
Block a user