react-native-macos 0.66.46 → 0.66.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Views/ScrollView/RCTScrollContentView.m +10 -27
- package/React/Views/ScrollView/RCTScrollView.m +1 -5
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
package/React/Base/RCTVersion.m
CHANGED
|
@@ -18,15 +18,11 @@
|
|
|
18
18
|
#import "RCTScrollView.h"
|
|
19
19
|
|
|
20
20
|
@implementation RCTScrollContentView
|
|
21
|
-
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
22
|
-
{
|
|
23
|
-
BOOL _hasHorizontalScroller;
|
|
24
|
-
BOOL _hasVerticalScroller;
|
|
25
|
-
}
|
|
26
|
-
#endif // ]TODO(macOS GH#774)
|
|
27
21
|
|
|
28
22
|
- (void)reactSetFrame:(CGRect)frame
|
|
29
23
|
{
|
|
24
|
+
[super reactSetFrame:frame];
|
|
25
|
+
|
|
30
26
|
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
31
27
|
RCTScrollView *scrollView = (RCTScrollView *)self.superview.superview;
|
|
32
28
|
#else // [TODO(macOS GH#774)
|
|
@@ -34,8 +30,6 @@
|
|
|
34
30
|
RCTScrollView *scrollView = (RCTScrollView *)self.superview.superview.superview;
|
|
35
31
|
#endif // ]TODO(macOS GH#774)
|
|
36
32
|
|
|
37
|
-
[super reactSetFrame:frame];
|
|
38
|
-
|
|
39
33
|
if (!scrollView) {
|
|
40
34
|
return;
|
|
41
35
|
}
|
|
@@ -43,7 +37,6 @@
|
|
|
43
37
|
RCTAssert([scrollView isKindOfClass:[RCTScrollView class]], @"Unexpected view hierarchy of RCTScrollView component.");
|
|
44
38
|
|
|
45
39
|
[scrollView updateContentSizeIfNeeded];
|
|
46
|
-
|
|
47
40
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
48
41
|
// On macOS scroll indicators may float over the content view like they do in iOS
|
|
49
42
|
// or depending on system preferences they may be outside of the content view
|
|
@@ -52,24 +45,14 @@
|
|
|
52
45
|
// the contents will overflow causing the scroll indicators to appear unnecessarily.
|
|
53
46
|
NSScrollView *platformScrollView = [scrollView scrollView];
|
|
54
47
|
if ([platformScrollView scrollerStyle] == NSScrollerStyleLegacy) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
CGFloat horizontalScrollerHeight = _hasHorizontalScroller ? NSHeight([[platformScrollView horizontalScroller] frame]) : 0;
|
|
65
|
-
CGFloat verticalScrollerWidth = _hasVerticalScroller ? NSWidth([[platformScrollView verticalScroller] frame]) : 0;
|
|
66
|
-
|
|
67
|
-
RCTScrollContentLocalData *localData =
|
|
68
|
-
[[RCTScrollContentLocalData alloc]
|
|
69
|
-
initWithVerticalScrollerWidth:horizontalScrollerHeight
|
|
70
|
-
horizontalScrollerHeight:verticalScrollerWidth];
|
|
71
|
-
[[[scrollView bridge] uiManager] setLocalData:localData forView:self];
|
|
72
|
-
}
|
|
48
|
+
CGFloat horizontalScrollerHeight = [platformScrollView hasHorizontalScroller] ? NSHeight([[platformScrollView horizontalScroller] frame]) : 0;
|
|
49
|
+
CGFloat verticalScrollerWidth = [platformScrollView hasVerticalScroller] ? NSWidth([[platformScrollView verticalScroller] frame]) : 0;
|
|
50
|
+
|
|
51
|
+
RCTScrollContentLocalData *localData =
|
|
52
|
+
[[RCTScrollContentLocalData alloc]
|
|
53
|
+
initWithVerticalScrollerWidth:horizontalScrollerHeight
|
|
54
|
+
horizontalScrollerHeight:verticalScrollerWidth];
|
|
55
|
+
[[[scrollView bridge] uiManager] setLocalData:localData forView:self];
|
|
73
56
|
}
|
|
74
57
|
#endif // ]TODO(macOS GH#774)
|
|
75
58
|
}
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
self.scrollEnabled = YES;
|
|
57
57
|
self.hasHorizontalScroller = YES;
|
|
58
58
|
self.hasVerticalScroller = YES;
|
|
59
|
+
self.autohidesScrollers = YES;
|
|
59
60
|
self.panGestureRecognizer = [[NSPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleCustomPan:)];
|
|
60
61
|
#else // ]TODO(macOS GH#774)
|
|
61
62
|
[self.panGestureRecognizer addTarget:self action:@selector(handleCustomPan:)];
|
|
@@ -642,11 +643,6 @@ static inline void RCTApplyTransformationAccordingLayoutDirection(
|
|
|
642
643
|
[self react_updateClippedSubviewsWithClipRect:clipRect relativeToView:clipView];
|
|
643
644
|
_lastClippedToRect = bounds;
|
|
644
645
|
}
|
|
645
|
-
|
|
646
|
-
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
647
|
-
[[self scrollView] setHasHorizontalScroller:[self isHorizontal:_scrollView]];
|
|
648
|
-
[[self scrollView] setHasVerticalScroller:[self isVertical:_scrollView]];
|
|
649
|
-
#endif // ]TODO(macOS GH#774)
|
|
650
646
|
}
|
|
651
647
|
|
|
652
648
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
package/package.json
CHANGED