@leafer-ui/interaction 1.6.0 → 1.6.2
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/package.json +6 -6
- package/src/Interaction.ts +10 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interaction",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "@leafer-ui/interaction",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "1.6.
|
|
26
|
-
"@leafer-ui/draw": "1.6.
|
|
27
|
-
"@leafer-ui/event": "1.6.
|
|
25
|
+
"@leafer/core": "1.6.2",
|
|
26
|
+
"@leafer-ui/draw": "1.6.2",
|
|
27
|
+
"@leafer-ui/event": "1.6.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@leafer/interface": "1.6.
|
|
31
|
-
"@leafer-ui/interface": "1.6.
|
|
30
|
+
"@leafer/interface": "1.6.2",
|
|
31
|
+
"@leafer-ui/interface": "1.6.2"
|
|
32
32
|
}
|
|
33
33
|
}
|
package/src/Interaction.ts
CHANGED
|
@@ -137,7 +137,7 @@ export class InteractionBase implements IInteraction {
|
|
|
137
137
|
if (this.downData) {
|
|
138
138
|
const canDrag = PointHelper.getDistance(this.downData, data) > this.p.dragDistance
|
|
139
139
|
if (canDrag) {
|
|
140
|
-
|
|
140
|
+
this.pointerWaitCancel()
|
|
141
141
|
this.waitRightTap = false
|
|
142
142
|
}
|
|
143
143
|
|
|
@@ -481,9 +481,11 @@ export class InteractionBase implements IInteraction {
|
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
protected tapWaitCancel(): void {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
484
|
+
if (this.waitTap) {
|
|
485
|
+
clearTimeout(this.tapTimer)
|
|
486
|
+
this.waitTap = false
|
|
487
|
+
this.tapCount = 0
|
|
488
|
+
}
|
|
487
489
|
}
|
|
488
490
|
|
|
489
491
|
protected longPressWait(data: IPointerEvent): void {
|
|
@@ -505,8 +507,10 @@ export class InteractionBase implements IInteraction {
|
|
|
505
507
|
}
|
|
506
508
|
|
|
507
509
|
protected longPressWaitCancel(): void {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
+
if (this.longPressTimer) {
|
|
511
|
+
clearTimeout(this.longPressTimer)
|
|
512
|
+
this.longPressed = false
|
|
513
|
+
}
|
|
510
514
|
}
|
|
511
515
|
|
|
512
516
|
protected __onResize(): void {
|