@nativescript-community/ui-drawer 0.0.35 → 0.1.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.1.0](https://github.com/nativescript-community/ui-drawer/compare/v0.0.35...v0.1.0) (2022-05-03)
7
+
8
+
9
+ ### Features
10
+
11
+ * allow `gestureHandlerOptions` to customize gesture handler ([6ba74c2](https://github.com/nativescript-community/ui-drawer/commit/6ba74c21cf8f96b05a4a030a049c96d606285aa2))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.0.35](https://github.com/nativescript-community/ui-drawer/compare/v0.0.34...v0.0.35) (2022-04-14)
7
18
 
8
19
  **Note:** Version bump only for package @nativescript-community/ui-drawer
package/README.md CHANGED
@@ -99,6 +99,7 @@ install();
99
99
  | leftDrawerMode | `slide` | `Mode ('under' or 'slide')` | The color of the backdrop behind the drawer |
100
100
  | rightDrawerMode | `slide` | `Mode ('under' or 'slide')` | The color of the backdrop behind the drawer |
101
101
  | gestureMinDist | `10` | number | The min "swipe" distance to trigger the menu gesture |
102
+ | gestureHandlerOptions | `null` | PanGestureHandlerOptions | Options to customize the pan gesture handler |
102
103
  | leftSwipeDistance | `40` | number | The "left" zone size from where the gesture is recognized |
103
104
  | rightSwipeDistance | `40` | number | The "right" zone size from where the gesture is recognized |
104
105
  | topSwipeDistance | `40` | number | The "top" zone size from where the gesture is recognized |
package/index.d.ts CHANGED
@@ -27,6 +27,7 @@ export declare class Drawer extends GridLayout {
27
27
  mainContent: View;
28
28
  backDrop: View;
29
29
  gestureMinDist: number;
30
+ gestureHandlerOptions: any;
30
31
  waitFor: any[];
31
32
  simultaneousHandlers: any[];
32
33
  shouldStartSheetDragging?: (side: Side | VerticalSide) => boolean;
package/index.js CHANGED
@@ -112,12 +112,7 @@ let Drawer = class Drawer extends GridLayout {
112
112
  }
113
113
  initGestures() {
114
114
  const manager = Manager.getInstance();
115
- const gestureHandler = manager.createGestureHandler(HandlerType.PAN, PAN_GESTURE_TAG, {
116
- shouldStartGesture: this.shouldStartGesture.bind(this),
117
- simultaneousHandlers: this.simultaneousHandlers,
118
- waitFor: this.waitFor,
119
- minDist: this.gestureMinDist
120
- });
115
+ const gestureHandler = manager.createGestureHandler(HandlerType.PAN, PAN_GESTURE_TAG, Object.assign({ shouldStartGesture: this.shouldStartGesture.bind(this), simultaneousHandlers: this.simultaneousHandlers, waitFor: this.waitFor, minDist: this.gestureMinDist }, (this.gestureHandlerOptions || {})));
121
116
  gestureHandler.on(GestureHandlerTouchEvent, this.onGestureTouch, this);
122
117
  gestureHandler.on(GestureHandlerStateEvent, this.onGestureState, this);
123
118
  gestureHandler.attachToView(this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-drawer",
3
- "version": "0.0.35",
3
+ "version": "0.1.0",
4
4
  "description": "Easily add a side drawer (side menu) to your projects.",
5
5
  "main": "./index",
6
6
  "sideEffects": false,
@@ -52,7 +52,7 @@
52
52
  "license": "Apache-2.0",
53
53
  "readmeFilename": "README.md",
54
54
  "dependencies": {
55
- "@nativescript-community/gesturehandler": "^2.0.3"
55
+ "@nativescript-community/gesturehandler": "^2.0.5"
56
56
  },
57
- "gitHead": "c43d340cb3fec8cd3e4a9245b16a81bb8e1ac40c"
57
+ "gitHead": "c47f20d7473875435ff8a0b2b9e2ea4520870565"
58
58
  }