mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 10:39:32 +01:00
Merge pull request #674: fix(mobile): give a sideways drag on the terminal to the session swipe alone
Second merge of #674: the author pushed the thumb-arc handback from the review themselves (e8fc08be), byte-identical in code to the merge-time fix already here, so this brings their round in and keeps the browser test and docs added at merge.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts:
# docs/wiki/Mobile-Guide.md
# src/web/public/terminal-ui.js
# test/session-swipe-gesture.test.ts
This commit is contained in:
commit
a85da87378
3 files changed
+18
-11
No files matched your search
@@ -1233,7 +1233,8 @@ Object.assign(CodemanApp.prototype, {
|
||||
// slop, so a diagonal drag cannot pan and scroll at the same time. 'swipe'
|
||||
// is a sideways drag on a terminal that cannot pan: it is the session
|
||||
// swipe's (SwipeHandler, mobile-handlers.js), so it neither scrolls nor
|
||||
// ends as a tap on the session being left. Published per gesture as
|
||||
// ends as a tap on the session being left, until it drifts past the
|
||||
// swipe's vertical limit and becomes a 'y' scroll. Published per gesture as
|
||||
// `this._terminalGestureAxis`, which SwipeHandler reads to stand aside
|
||||
// for a scroll or a pan.
|
||||
let panAxis = null;
|
||||
@@ -1370,7 +1371,8 @@ Object.assign(CodemanApp.prototype, {
|
||||
ev.preventDefault();
|
||||
if (panAxis === 'swipe') {
|
||||
// Past the swipe's own vertical drift limit the session swipe has
|
||||
// given up, so the drag is a scroll after all: hand it to 'y'.
|
||||
// given up, so the drag is a scroll after all (a thumb arc whose
|
||||
// first move leaned sideways): hand it to 'y'.
|
||||
const drift = typeof SwipeHandler !== 'undefined' ? SwipeHandler.maxVerticalDrift : 50;
|
||||
if (Math.abs(touchY - touchStartY) <= drift) return;
|
||||
panAxis = 'y';
|
||||
|
||||
Reference in new issue
Block a user