mirror of
https://github.com/status-im/react-native.git
synced 2025-02-10 00:23:26 +00:00
'-[RCTSurfaceRootShadowView sizeThatFitsMinimumSize:]' was removed
Summary: Because we already support this for all kinds of shadow views! Reviewed By: mmmulani Differential Revision: D6665636 fbshipit-source-id: ceee7e4952ede4bbe54aedde5545587a1d13ea5a
This commit is contained in:
parent
b2a251948f
commit
176a578238
@ -15,6 +15,7 @@
|
|||||||
#import "RCTAssert.h"
|
#import "RCTAssert.h"
|
||||||
#import "RCTBridge+Private.h"
|
#import "RCTBridge+Private.h"
|
||||||
#import "RCTBridge.h"
|
#import "RCTBridge.h"
|
||||||
|
#import "RCTShadowView+Layout.h"
|
||||||
#import "RCTSurfaceDelegate.h"
|
#import "RCTSurfaceDelegate.h"
|
||||||
#import "RCTSurfaceRootShadowView.h"
|
#import "RCTSurfaceRootShadowView.h"
|
||||||
#import "RCTSurfaceRootShadowViewDelegate.h"
|
#import "RCTSurfaceRootShadowViewDelegate.h"
|
||||||
|
@ -22,9 +22,6 @@
|
|||||||
|
|
||||||
@property (nonatomic, weak) id<RCTSurfaceRootShadowViewDelegate> delegate;
|
@property (nonatomic, weak) id<RCTSurfaceRootShadowViewDelegate> delegate;
|
||||||
|
|
||||||
- (CGSize)sizeThatFitsMinimumSize:(CGSize)minimumSize
|
|
||||||
maximumSize:(CGSize)maximumSize;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Layout direction (LTR or RTL) inherited from native environment and
|
* Layout direction (LTR or RTL) inherited from native environment and
|
||||||
* is using as a base direction value in layout engine.
|
* is using as a base direction value in layout engine.
|
||||||
|
@ -76,41 +76,6 @@
|
|||||||
return viewsWithNewFrame;
|
return viewsWithNewFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (CGSize)sizeThatFitsMinimumSize:(CGSize)minimumSize
|
|
||||||
maximumSize:(CGSize)maximumSize
|
|
||||||
{
|
|
||||||
// Positive case where requested constraind are aready enforced.
|
|
||||||
if (CGSizeEqualToSize(minimumSize, _minimumSize) &&
|
|
||||||
CGSizeEqualToSize(maximumSize, _maximumSize)) {
|
|
||||||
// We stil need to call `calculateLayoutWithMinimumSize:maximumSize`
|
|
||||||
// mehtod though.
|
|
||||||
[self calculateLayoutWithMinimumSize:_minimumSize
|
|
||||||
maximumSize:_maximumSize];
|
|
||||||
|
|
||||||
YGNodeRef yogaNode = self.yogaNode;
|
|
||||||
return CGSizeMake(YGNodeLayoutGetWidth(yogaNode), YGNodeLayoutGetHeight(yogaNode));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generic case, where requested constraind are different from enforced.
|
|
||||||
|
|
||||||
// Applying given size constraints.
|
|
||||||
[self calculateLayoutWithMinimumSize:minimumSize
|
|
||||||
maximumSize:maximumSize];
|
|
||||||
|
|
||||||
YGNodeRef yogaNode = self.yogaNode;
|
|
||||||
CGSize fittingSize =
|
|
||||||
CGSizeMake(YGNodeLayoutGetWidth(yogaNode), YGNodeLayoutGetHeight(yogaNode));
|
|
||||||
|
|
||||||
// Reverting size constraints.
|
|
||||||
[self calculateLayoutWithMinimumSize:_minimumSize
|
|
||||||
maximumSize:_maximumSize];
|
|
||||||
|
|
||||||
return CGSizeMake(
|
|
||||||
MAX(minimumSize.width, MIN(maximumSize.width, fittingSize.width)),
|
|
||||||
MAX(minimumSize.height, MIN(maximumSize.height, fittingSize.height))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setMinimumSize:(CGSize)minimumSize maximumSize:(CGSize)maximumSize
|
- (void)setMinimumSize:(CGSize)minimumSize maximumSize:(CGSize)maximumSize
|
||||||
{
|
{
|
||||||
if (CGSizeEqualToSize(minimumSize, _minimumSize) &&
|
if (CGSizeEqualToSize(minimumSize, _minimumSize) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user