Skip to content

Commit ba3d542

Browse files
committed
fix: added figer offset to clearly view the line while selection dragging
1 parent 05d3268 commit ba3d542

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/terminal/terminalTouchSelection.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default class TerminalTouchSelection {
1313
handleSize: 24,
1414
hapticFeedback: true,
1515
showContextMenu: true,
16+
fingerOffset: 40, // Offset in pixels to position selection above finger during drag
1617
...options,
1718
};
1819

@@ -343,7 +344,13 @@ export default class TerminalTouchSelection {
343344
return;
344345
}
345346

346-
const coords = this.touchToTerminalCoords(touch);
347+
// Apply finger offset for better visibility during drag
348+
const adjustedTouch = {
349+
clientX: touch.clientX,
350+
clientY: touch.clientY - this.options.fingerOffset,
351+
};
352+
353+
const coords = this.touchToTerminalCoords(adjustedTouch);
347354

348355
if (coords) {
349356
// Allow handle swapping but manage it properly

0 commit comments

Comments
 (0)