Skip to content

Commit 7edf7f6

Browse files
style(terminal): Some touch selection handle enhancements (#1611)
1 parent c2830e9 commit 7edf7f6

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/components/terminal/terminalTouchSelection.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@
2424
z-index: 101;
2525
cursor: grab;
2626
transition: transform 0.15s ease;
27+
border-radius: 50% 50% 50% 0;
2728
}
2829

2930
.terminal-selection-handle:active {
3031
cursor: grabbing;
3132
}
3233

33-
.terminal-selection-handle-start,
34+
.terminal-selection-handle-start {
35+
transform: rotate(180deg) translateX(87%);
36+
}
3437
.terminal-selection-handle-end {
35-
transform: rotate(135deg);
36-
border-radius: 50% 50% 50% 0;
38+
transform: rotate(90deg) translateX(-13%);
3739
}
3840

3941
.terminal-context-menu {

src/components/terminal/terminalTouchSelection.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ export default class TerminalTouchSelection {
8888
createHandles() {
8989
this.startHandle = this.createHandle("start");
9090
this.startHandle.style.cssText += `
91-
transform: rotate(135deg);
91+
transform: rotate(180deg) translateX(87%);
9292
border-radius: 50% 50% 50% 0;
9393
`;
9494

9595
this.endHandle = this.createHandle("end");
9696
this.endHandle.style.cssText += `
97-
transform: rotate(135deg);
97+
transform: rotate(90deg) translateY(-13%);
9898
border-radius: 50% 50% 50% 0;
9999
`;
100100

@@ -735,7 +735,7 @@ export default class TerminalTouchSelection {
735735
// Show/hide start handle at logical start position
736736
if (startPos) {
737737
this.startHandle.style.display = "block";
738-
this.startHandle.style.left = `${startPos.x - this.options.handleSize / 2 - 0.1}px`;
738+
this.startHandle.style.left = `${startPos.x}px`;
739739
this.startHandle.style.top = `${startPos.y + this.cellDimensions.height + 4}px`;
740740
} else {
741741
this.startHandle.style.display = "none";
@@ -744,7 +744,7 @@ export default class TerminalTouchSelection {
744744
// Show/hide end handle at logical end position
745745
if (endPos) {
746746
this.endHandle.style.display = "block";
747-
this.endHandle.style.left = `${endPos.x + this.cellDimensions.width - this.options.handleSize / 2 - 1}px`;
747+
this.endHandle.style.left = `${endPos.x + this.cellDimensions.width}px`;
748748
this.endHandle.style.top = `${endPos.y + this.cellDimensions.height + 4}px`;
749749
} else {
750750
this.endHandle.style.display = "none";

0 commit comments

Comments
 (0)