diff options
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -6388,7 +6388,7 @@ if (INTENT_URI) { if (typeof window === 'undefined' || matchMedia('(prefers-reduced-motion: reduce)').matches) return; const SCOPE = '.feed-page, .notes-feed'; const TAU = 325; // ms: how quickly a coast dies down (the phone's feel) - const VMAX = 9; // px/ms + const VMAX = 16; // px/ms const inScope = (t) => { const el = t && t.closest ? t : t && t.parentElement; if (!el || !el.closest(SCOPE)) return false; @@ -6430,7 +6430,7 @@ if (INTENT_URI) { const px = e.deltaMode === 1 ? e.deltaY * 40 : e.deltaY; // reverse turns brake first; same-way turns add to the coast already going const keep = Math.sign(v) === Math.sign(px) ? v : 0; - coast(keep + (px * 2.4) / TAU); + coast(keep + (px * 3) / TAU); }, { passive: false }); // anything else that moves the page takes over from a coast window.addEventListener('keydown', (e) => { if (/^(Arrow|Page|Home|End| )/.test(e.key)) stop(); }); @@ -6469,7 +6469,7 @@ if (INTENT_URI) { document.documentElement.classList.remove('grab-scrolling'); const p = d.pts, a = p[0], b = p[p.length - 1]; // released while moving: throw it; held still first: just let go - if (a && b && b[0] > a[0] && e.timeStamp - b[0] < 60) coast((a[1] - b[1]) / (b[0] - a[0]) * 1.2); + if (a && b && b[0] > a[0] && e.timeStamp - b[0] < 60) coast((a[1] - b[1]) / (b[0] - a[0]) * 2.4); } // the press moved: what it started on isn't opened (Chrome still clicks it) const eat = (ev) => { ev.stopPropagation(); ev.preventDefault(); }; |
