@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/dev/jsenv_navi.js
CHANGED
|
@@ -41741,9 +41741,11 @@ const readRowStretch = (scroller, pages, page, { sideways } = {}) => {
|
|
|
41741
41741
|
/**
|
|
41742
41742
|
* @param {Element} scroller
|
|
41743
41743
|
* @param {object} options
|
|
41744
|
-
* @param {(move: {finger: boolean}) => void} options.onScroll - the
|
|
41745
|
-
* `finger`: a touch has come since the row last stopped, so a lift will
|
|
41746
|
-
* it goes (`onLeftToSnap`). Without one (a trackpad, a wheel) nothing
|
|
41744
|
+
* @param {(move: {finger: boolean, lifted: boolean}) => void} options.onScroll - the
|
|
41745
|
+
* row moved. `finger`: a touch has come since the row last stopped, so a lift will
|
|
41746
|
+
* say where it goes (`onLeftToSnap`). Without one (a trackpad, a wheel) nothing
|
|
41747
|
+
* will. `lifted`: that finger has lifted and none has landed since: no hand moves
|
|
41748
|
+
* the row, the snap the lift left running does.
|
|
41747
41749
|
* @param {(event: Event|null) => void} options.onLand - the row may have stopped.
|
|
41748
41750
|
* Read `pageAtRest` to know whether it stopped on a page. Heard more than once
|
|
41749
41751
|
* for one landing, so what it does must find nothing to do the second time.
|
|
@@ -41774,7 +41776,10 @@ const watchRowScroll = (
|
|
|
41774
41776
|
stoppedTimeout = setTimeout(landOnSilence, STOPPED_SILENCE);
|
|
41775
41777
|
};
|
|
41776
41778
|
const onScrollEvent = () => {
|
|
41777
|
-
onScroll({
|
|
41779
|
+
onScroll({
|
|
41780
|
+
finger: touchedSinceStop,
|
|
41781
|
+
lifted: touchedSinceStop && !touching,
|
|
41782
|
+
});
|
|
41778
41783
|
armSilence();
|
|
41779
41784
|
if (!liftedAt) {
|
|
41780
41785
|
return;
|
|
@@ -42358,7 +42363,8 @@ const RouteTravel = ({
|
|
|
42358
42363
|
const row = rowRef.current;
|
|
42359
42364
|
const isClipped = () => row.getAttribute("data-route-row-taken") === "clip";
|
|
42360
42365
|
const onScroll = ({
|
|
42361
|
-
finger
|
|
42366
|
+
finger,
|
|
42367
|
+
lifted
|
|
42362
42368
|
}) => {
|
|
42363
42369
|
const {
|
|
42364
42370
|
pages,
|
|
@@ -42393,6 +42399,12 @@ const RouteTravel = ({
|
|
|
42393
42399
|
} = readRowFrame(row, panes);
|
|
42394
42400
|
followPageOnScreen(pages[panes.indexOf(fraction >= 0.5 && toward ? toward : base)], askedPageRef.current || pages[currentIndex]);
|
|
42395
42401
|
}
|
|
42402
|
+
// The pull is read from the pane of the address. Once the finger has lifted,
|
|
42403
|
+
// the address is where the snap goes (onLeftToSnap), and what still lies
|
|
42404
|
+
// between is the snap playing out, not a hand pulling towards the neighbour.
|
|
42405
|
+
if (lifted) {
|
|
42406
|
+
return;
|
|
42407
|
+
}
|
|
42396
42408
|
const pulled = row.scrollLeft - pane.offsetLeft;
|
|
42397
42409
|
if (Math.abs(pulled) < SET_OFF_PULL) {
|
|
42398
42410
|
return;
|