Skip to content

Commit 4ef9b94

Browse files
Mateusz KiełbMateusz Kiełb
authored andcommitted
fixed inconsitent container sizes
1 parent 3eb98c2 commit 4ef9b94

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

packages/docs-gesture-handler/static/examples/PanGestureBasic.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,10 @@ export default function App() {
8181
});
8282

8383
return (
84-
<GestureHandlerRootView>
85-
<View ref={containerRef} style={styles.container}>
86-
<GestureDetector gesture={pan}>
87-
<Animated.View style={[animatedStyles, styles.box]}></Animated.View>
88-
</GestureDetector>
89-
</View>
84+
<GestureHandlerRootView ref={containerRef} style={styles.container}>
85+
<GestureDetector gesture={pan}>
86+
<Animated.View style={[animatedStyles, styles.box]}></Animated.View>
87+
</GestureDetector>
9088
</GestureHandlerRootView>
9189
);
9290
}
@@ -96,11 +94,10 @@ const styles = StyleSheet.create({
9694
flex: 1,
9795
alignItems: 'center',
9896
justifyContent: 'center',
99-
aspectRatio: 3,
10097
},
10198
box: {
10299
width: 100,
103-
height: 100,
100+
aspectRatio: 1,
104101
backgroundColor: '#b58df1',
105102
borderRadius: 20,
106103
},

packages/docs-gesture-handler/static/examples/PinchGestureBasic.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ const styles = StyleSheet.create({
132132
flex: 1,
133133
alignItems: 'center',
134134
justifyContent: 'center',
135-
aspectRatio: 3,
136135
},
137136
box: {
138137
aspectRatio: 1,

packages/docs-gesture-handler/static/examples/TapGestureBasic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const styles = StyleSheet.create({
5454
},
5555
box: {
5656
width: 100,
57-
height: 100,
57+
aspectRatio: 1,
5858
borderRadius: 20,
5959
cursor: 'pointer',
6060
},

0 commit comments

Comments
 (0)