@jsenv/dom 0.17.68 → 0.17.69
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/dist/jsenv_dom.js +19 -15
- package/package.json +1 -1
package/dist/jsenv_dom.js
CHANGED
|
@@ -12530,6 +12530,7 @@ const travelsAfter = ({
|
|
|
12530
12530
|
size,
|
|
12531
12531
|
velocity,
|
|
12532
12532
|
towardsSomething,
|
|
12533
|
+
cancelled,
|
|
12533
12534
|
commitRatio,
|
|
12534
12535
|
}) => {
|
|
12535
12536
|
if (!towardsSomething) {
|
|
@@ -12539,10 +12540,17 @@ const travelsAfter = ({
|
|
|
12539
12540
|
// carries on. Answered on the distance alone, a travel a hand merely touched
|
|
12540
12541
|
// is undone BY the touch — it was stopped where it stood, and where it stood
|
|
12541
12542
|
// is not far enough to count as an intention. Nobody asked it to stop; it was
|
|
12542
|
-
// asked to wait.
|
|
12543
|
-
|
|
12543
|
+
// asked to wait. A gesture TAKEN AWAY said nothing either (the browser
|
|
12544
|
+
// scrolling something else, a call coming in): its end was decided before
|
|
12545
|
+
// the press, and it is that end it goes on to.
|
|
12546
|
+
if (slack && (cancelled || Math.abs(pulled - slack) < DRAG_START_THRESHOLD)) {
|
|
12544
12547
|
return true;
|
|
12545
12548
|
}
|
|
12549
|
+
// Taken away from a travel this gesture began: things go back rather than
|
|
12550
|
+
// landing wherever the hand happened to be.
|
|
12551
|
+
if (cancelled) {
|
|
12552
|
+
return false;
|
|
12553
|
+
}
|
|
12546
12554
|
const sign = pulled > 0 ? 1 : -1;
|
|
12547
12555
|
// A hand that is still moving says where it is going, and it says it about
|
|
12548
12556
|
// BOTH answers. Going away from what it was bringing in fast is "put it
|
|
@@ -12930,9 +12938,6 @@ const startDragToTravel = (
|
|
|
12930
12938
|
const towardsSomething = pulled > 0 ? travel.travelBack : travel.travelOn;
|
|
12931
12939
|
const velocity =
|
|
12932
12940
|
axis === "x" ? gestureInfo.velocityX : gestureInfo.velocityY;
|
|
12933
|
-
// A gesture taken away rather than let go of (the browser scrolling
|
|
12934
|
-
// something else, a call coming in, another gesture taking the pointer)
|
|
12935
|
-
// said nothing: things go back.
|
|
12936
12941
|
const releaseEvent = gestureInfo.releaseEvent || gestureInfo.dragEvent;
|
|
12937
12942
|
const { cancelled } = gestureInfo;
|
|
12938
12943
|
onEnd({
|
|
@@ -12940,16 +12945,15 @@ const startDragToTravel = (
|
|
|
12940
12945
|
pulled,
|
|
12941
12946
|
size,
|
|
12942
12947
|
sign: pulled > 0 ? 1 : -1,
|
|
12943
|
-
travels:
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
}),
|
|
12948
|
+
travels: travelsAfter({
|
|
12949
|
+
pulled,
|
|
12950
|
+
slack,
|
|
12951
|
+
size,
|
|
12952
|
+
velocity,
|
|
12953
|
+
towardsSomething,
|
|
12954
|
+
cancelled,
|
|
12955
|
+
commitRatio,
|
|
12956
|
+
}),
|
|
12953
12957
|
cancelled,
|
|
12954
12958
|
event: releaseEvent,
|
|
12955
12959
|
});
|