mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-23 19:49:56 +01:00
mobile: fix material menu
This commit is contained in:
@@ -1,12 +1,26 @@
|
||||
diff --git a/node_modules/react-native-material-menu/dist/Menu.js b/node_modules/react-native-material-menu/dist/Menu.js
|
||||
index 64fbf13..c7fcee0 100644
|
||||
index 64fbf13..beeda72 100644
|
||||
--- a/node_modules/react-native-material-menu/dist/Menu.js
|
||||
+++ b/node_modules/react-native-material-menu/dist/Menu.js
|
||||
@@ -132,10 +132,13 @@ class Menu extends react_1.default.Component {
|
||||
else if (left < SCREEN_INDENT) {
|
||||
left = SCREEN_INDENT;
|
||||
@@ -55,7 +55,7 @@ class Menu extends react_1.default.Component {
|
||||
};
|
||||
// Start menu animation
|
||||
onMenuLayout = (e) => {
|
||||
- if (this.state.menuState === States.Animating) {
|
||||
+ if (this.state.menuState === States.Animating || this.state.menuState === States.Hidden) {
|
||||
return;
|
||||
}
|
||||
const { width, height } = e.nativeEvent.layout;
|
||||
@@ -110,6 +110,7 @@ class Menu extends react_1.default.Component {
|
||||
this.props.onRequestClose?.();
|
||||
};
|
||||
render() {
|
||||
+
|
||||
const { isRTL } = react_native_1.I18nManager;
|
||||
const dimensions = react_native_1.Dimensions.get('window');
|
||||
const { width: windowWidth } = dimensions;
|
||||
@@ -134,8 +135,10 @@ class Menu extends react_1.default.Component {
|
||||
}
|
||||
+ console.log(top, windowHeight - menuHeight - SCREEN_INDENT);
|
||||
// Flip by Y axis if menu hits bottom screen border
|
||||
if (top > windowHeight - menuHeight - SCREEN_INDENT) {
|
||||
+ const diff = top - (windowHeight - menuHeight - SCREEN_INDENT);
|
||||
|
||||
Reference in New Issue
Block a user