mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
fix an issue where scrollview wouldn't unclip its cells
Summary: Issue we were seeing: scrollview would clip its cells when it was resized to 0 height and moved offscreen, but it wouldn't add it back when it was resized and moved back Why this was happening: scrollview wouldn't rerun its un/clipping logic after the first run unless 1/it has 0x0 frame or 2/it has been scrolled. Neither was happening here. Fix: run the un/clipping logic when scrollview's frame has been changed since the last clipping. Reviewed By: javache Differential Revision: D3436996 fbshipit-source-id: 1a8cfeb72b425fcc80815d30743fa308b9c75ab6
This commit is contained in:
parent
979d1c7e71
commit
1fcd73f384
@ -515,6 +515,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
|
||||
|
||||
const BOOL shouldClipAgain =
|
||||
CGRectIsNull(_lastClippedToRect) ||
|
||||
!CGRectEqualToRect(_lastClippedToRect, bounds) ||
|
||||
(scrollsHorizontally && (bounds.size.width < leeway || fabs(_lastClippedToRect.origin.x - bounds.origin.x) >= leeway)) ||
|
||||
(scrollsVertically && (bounds.size.height < leeway || fabs(_lastClippedToRect.origin.y - bounds.origin.y) >= leeway));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user