-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(paper): prevent freeze on layout update during transition
- Loading branch information
Showing
5 changed files
with
54 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#import <React/RCTShadowView.h> | ||
|
||
@interface RNCPagerViewShadowView : RCTShadowView | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#import "RNCPagerViewShadowView.h" | ||
|
||
@implementation RNCPagerViewShadowView { | ||
BOOL _transitioning; | ||
} | ||
|
||
- (void)layoutWithMetrics:(RCTLayoutMetrics)layoutMetrics | ||
layoutContext:(RCTLayoutContext)layoutContext { | ||
if (_transitioning) { | ||
return; | ||
} | ||
|
||
[super layoutWithMetrics:layoutMetrics layoutContext:layoutContext]; | ||
} | ||
|
||
- (void)setLocalData:(NSDictionary *)localData { | ||
[super setLocalData:localData]; | ||
|
||
_transitioning = [localData[@"transitioning"] boolValue]; | ||
} | ||
|
||
@end |