Skip to content

Commit 5ec9e5f

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # yarn.lock
2 parents 06dc70d + e8d0590 commit 5ec9e5f

File tree

15 files changed

+200
-138
lines changed

15 files changed

+200
-138
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ packages/**/*.d.ts
4343
bin
4444
build
4545
Pods
46-
!packages/platforms
46+
!packages/*/platforms
4747
/packages/**/*.aar
48+
/packages/**/*.framework
49+
/packages/**/*.xcframework
4850
/demo-snippets/**/*.aar
4951
*.xcuserdatad
5052
/packages/README.md

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [2.0.26](https://github.com/nativescript-community/gesturehandler/compare/v2.0.25...v2.0.26) (2024-02-23)
7+
8+
### Bug Fixes
9+
10+
* **ios:** fling gesture fix ([f58dd24](https://github.com/nativescript-community/gesturehandler/commit/f58dd246e7158b1173f4c79ddb08340cf4583812))
11+
* **ios:** test for gesture activation on first touch like Android ([780700b](https://github.com/nativescript-community/gesturehandler/commit/780700bafca703653d1c44c49bdc66c74e7df471))
12+
13+
## [2.0.25](https://github.com/nativescript-community/gesturehandler/compare/v2.0.24...v2.0.25) (2024-02-02)
14+
15+
### Bug Fixes
16+
17+
* **ios:** trigger the longPress gesture on begin ([b2b9ffa](https://github.com/nativescript-community/gesturehandler/commit/b2b9ffaedfd7aab5abd31a01d0803460c9f1aaf0))
18+
619
## [2.0.24](https://github.com/nativescript-community/gesturehandler/compare/v2.0.23...v2.0.24) (2024-01-18)
720

821
### Bug Fixes

demo-vue

docs/assets/navigation.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.0.24",
2+
"version": "2.0.26",
33
"$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json",
44
"packages": [
55
"packages/*"

packages/gesturehandler/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [2.0.26](https://github.com/nativescript-community/gesturehandler/compare/v2.0.25...v2.0.26) (2024-02-23)
7+
8+
### Bug Fixes
9+
10+
* **ios:** fling gesture fix ([f58dd24](https://github.com/nativescript-community/gesturehandler/commit/f58dd246e7158b1173f4c79ddb08340cf4583812))
11+
* **ios:** test for gesture activation on first touch like Android ([780700b](https://github.com/nativescript-community/gesturehandler/commit/780700bafca703653d1c44c49bdc66c74e7df471))
12+
13+
## [2.0.25](https://github.com/nativescript-community/gesturehandler/compare/v2.0.24...v2.0.25) (2024-02-02)
14+
15+
**Note:** Version bump only for package @nativescript-community/gesturehandler
16+
617
## [2.0.24](https://github.com/nativescript-community/gesturehandler/compare/v2.0.23...v2.0.24) (2024-01-18)
718

819
### Bug Fixes

packages/gesturehandler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript-community/gesturehandler",
3-
"version": "2.0.24",
3+
"version": "2.0.26",
44
"description": "Declarative API exposing platform native touch and gesture system to NativeScript.",
55
"main": "gesturehandler",
66
"sideEffects": false,

packages/gesturehandler/platforms/ios/src/FlingHandler.m

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ @implementation FlingGestureHandler
1414
- (instancetype)initWithTag:(NSNumber *)tag
1515
{
1616
if ((self = [super initWithTag:tag])) {
17-
self.direction = UISwipeGestureRecognizerDirectionLeft | UISwipeGestureRecognizerDirectionRight | UISwipeGestureRecognizerDirectionUp | UISwipeGestureRecognizerDirectionDown;
17+
_direction = UISwipeGestureRecognizerDirectionLeft | UISwipeGestureRecognizerDirectionRight | UISwipeGestureRecognizerDirectionUp | UISwipeGestureRecognizerDirectionDown;
1818
_recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
1919
[(UISwipeGestureRecognizer*)_recognizer setDirection:UISwipeGestureRecognizerDirectionLeft];
2020
_rightrecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
@@ -34,17 +34,17 @@ - (void)configure:(NSDictionary *)config
3434

3535
id prop = config[@"direction"];
3636
if (prop != nil) {
37-
self.direction = [prop integerValue];
38-
if ((self.direction & UISwipeGestureRecognizerDirectionLeft) == 0) {
37+
_direction = [prop integerValue];
38+
if ((_direction & UISwipeGestureRecognizerDirectionLeft) == 0) {
3939
_recognizer.enabled = NO;
4040
}
41-
if ((self.direction & UISwipeGestureRecognizerDirectionRight) == 0) {
41+
if ((_direction & UISwipeGestureRecognizerDirectionRight) == 0) {
4242
_rightrecognizer.enabled = NO;
4343
}
44-
if ((self.direction & UISwipeGestureRecognizerDirectionUp) == 0) {
44+
if ((_direction & UISwipeGestureRecognizerDirectionUp) == 0) {
4545
_toprecognizer.enabled = NO;
4646
}
47-
if ((self.direction & UISwipeGestureRecognizerDirectionDown) == 0) {
47+
if ((_direction & UISwipeGestureRecognizerDirectionDown) == 0) {
4848
_bottomrecognizer.enabled = NO;
4949
}
5050
}
@@ -90,7 +90,11 @@ - (void)unbindFromView
9090
_bottomrecognizer.delegate = nil;
9191
}
9292
- (void) setDirection:(NSInteger) value {
93-
((UISwipeGestureRecognizer *)_recognizer).direction = value;
93+
_direction = value;
94+
_recognizer.enabled = (_direction & UISwipeGestureRecognizerDirectionLeft) != 0;
95+
_rightrecognizer.enabled = (_direction & UISwipeGestureRecognizerDirectionRight) != 0;
96+
_toprecognizer.enabled = (_direction & UISwipeGestureRecognizerDirectionUp) != 0;
97+
_bottomrecognizer.enabled = (_direction & UISwipeGestureRecognizerDirectionDown) != 0;
9498
}
9599
//
96100
//- (NSNumber *) direction {
@@ -128,4 +132,3 @@ - (NSMutableDictionary *)eventExtraData:(UISwipeGestureRecognizer *)recognizer
128132
return result;
129133
}
130134
@end
131-

packages/gesturehandler/platforms/ios/src/GestureHandler.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ if (value != nil) recognizer.prop = [value type]; \
7878
//@property (nonatomic, weak, nullable) id<GestureHandlerEventEmitter> emitter;
7979
@property (nonatomic, readonly, nullable) UIGestureRecognizer *recognizer;
8080
@property (nonatomic) BOOL enabled;
81+
@property (nonatomic) BOOL activateOnBegin;
8182
@property(nonatomic) BOOL shouldCancelWhenOutside;
8283
@property (nullable, nonatomic, weak) id<GestureHandlerDelegate> delegate;
8384

0 commit comments

Comments
 (0)