@jsenv/navi 0.30.8 → 0.30.9
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/dev/jsenv_navi.js +17 -5
- package/dist/dev/jsenv_navi.js.map +3 -3
- package/dist/jsenv_navi.js +17 -5
- package/dist/jsenv_navi.js.map +3 -3
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -40450,9 +40450,11 @@ const readRowStretch = (scroller, pages, page, { sideways } = {}) => {
|
|
|
40450
40450
|
/**
|
|
40451
40451
|
* @param {Element} scroller
|
|
40452
40452
|
* @param {object} options
|
|
40453
|
-
* @param {(move: {finger: boolean}) => void} options.onScroll - the
|
|
40454
|
-
* `finger`: a touch has come since the row last stopped, so a lift will
|
|
40455
|
-
* it goes (`onLeftToSnap`). Without one (a trackpad, a wheel) nothing
|
|
40453
|
+
* @param {(move: {finger: boolean, lifted: boolean}) => void} options.onScroll - the
|
|
40454
|
+
* row moved. `finger`: a touch has come since the row last stopped, so a lift will
|
|
40455
|
+
* say where it goes (`onLeftToSnap`). Without one (a trackpad, a wheel) nothing
|
|
40456
|
+
* will. `lifted`: that finger has lifted and none has landed since: no hand moves
|
|
40457
|
+
* the row, the snap the lift left running does.
|
|
40456
40458
|
* @param {(event: Event|null) => void} options.onLand - the row may have stopped.
|
|
40457
40459
|
* Read `pageAtRest` to know whether it stopped on a page. Heard more than once
|
|
40458
40460
|
* for one landing, so what it does must find nothing to do the second time.
|
|
@@ -40483,7 +40485,10 @@ const watchRowScroll = (
|
|
|
40483
40485
|
stoppedTimeout = setTimeout(landOnSilence, STOPPED_SILENCE);
|
|
40484
40486
|
};
|
|
40485
40487
|
const onScrollEvent = () => {
|
|
40486
|
-
onScroll({
|
|
40488
|
+
onScroll({
|
|
40489
|
+
finger: touchedSinceStop,
|
|
40490
|
+
lifted: touchedSinceStop && !touching,
|
|
40491
|
+
});
|
|
40487
40492
|
armSilence();
|
|
40488
40493
|
if (!liftedAt) {
|
|
40489
40494
|
return;
|
|
@@ -41067,7 +41072,8 @@ const RouteTravel = ({
|
|
|
41067
41072
|
const row = rowRef.current;
|
|
41068
41073
|
const isClipped = () => row.getAttribute("data-route-row-taken") === "clip";
|
|
41069
41074
|
const onScroll = ({
|
|
41070
|
-
finger
|
|
41075
|
+
finger,
|
|
41076
|
+
lifted
|
|
41071
41077
|
}) => {
|
|
41072
41078
|
const {
|
|
41073
41079
|
pages,
|
|
@@ -41102,6 +41108,12 @@ const RouteTravel = ({
|
|
|
41102
41108
|
} = readRowFrame(row, panes);
|
|
41103
41109
|
followPageOnScreen(pages[panes.indexOf(fraction >= 0.5 && toward ? toward : base)], askedPageRef.current || pages[currentIndex]);
|
|
41104
41110
|
}
|
|
41111
|
+
// The pull is read from the pane of the address. Once the finger has lifted,
|
|
41112
|
+
// the address is where the snap goes (onLeftToSnap), and what still lies
|
|
41113
|
+
// between is the snap playing out, not a hand pulling towards the neighbour.
|
|
41114
|
+
if (lifted) {
|
|
41115
|
+
return;
|
|
41116
|
+
}
|
|
41105
41117
|
const pulled = row.scrollLeft - pane.offsetLeft;
|
|
41106
41118
|
if (Math.abs(pulled) < SET_OFF_PULL) {
|
|
41107
41119
|
return;
|