@leafer-ui/core 1.6.0 → 1.6.1

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/lib/core.esm.js CHANGED
@@ -788,8 +788,7 @@ class InteractionBase {
788
788
  if (this.downData) {
789
789
  const canDrag = PointHelper.getDistance(this.downData, data) > this.p.dragDistance;
790
790
  if (canDrag) {
791
- if (this.waitTap || this.longPressTimer)
792
- this.pointerWaitCancel();
791
+ this.pointerWaitCancel();
793
792
  this.waitRightTap = false;
794
793
  }
795
794
  this.dragger.checkDrag(data, canDrag);
@@ -1071,9 +1070,11 @@ class InteractionBase {
1071
1070
  this.waitTap = true;
1072
1071
  }
1073
1072
  tapWaitCancel() {
1074
- clearTimeout(this.tapTimer);
1075
- this.waitTap = false;
1076
- this.tapCount = 0;
1073
+ if (this.waitTap) {
1074
+ clearTimeout(this.tapTimer);
1075
+ this.waitTap = false;
1076
+ this.tapCount = 0;
1077
+ }
1077
1078
  }
1078
1079
  longPressWait(data) {
1079
1080
  clearTimeout(this.longPressTimer);
@@ -1093,8 +1094,10 @@ class InteractionBase {
1093
1094
  return hasLong;
1094
1095
  }
1095
1096
  longPressWaitCancel() {
1096
- clearTimeout(this.longPressTimer);
1097
- this.longPressed = false;
1097
+ if (this.longPressTimer) {
1098
+ clearTimeout(this.longPressTimer);
1099
+ this.longPressed = false;
1100
+ }
1098
1101
  }
1099
1102
  __onResize() {
1100
1103
  const { dragOut } = this.m;