Skip to content

Commit 5408a97

Browse files
authored
Fix: There was an issue introduced during refactoring. The problem occurs when the user drags too quickly from left to right: the mouse suddenly leaves the dialog window and loses the drag content. This causes the dragging to get stuck and results in poor UX. (#642)
This is the reason behind the rather complex border logic. Increasing or changing the border requires recalculating the icon’s position. It’s not particularly nice, but it works quite smoothly.
1 parent fda7342 commit 5408a97

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/app/view/dialogs/trainrun-and-section-dialog/trainrun-and-section-dialog.component.scss

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,30 @@
101101
cursor: move;
102102

103103
.dialog-drag-handle-icon {
104-
transform: translate(-12px, 242px);
104+
transform: translate(-12px, 230px);
105105
pointer-events: none;
106106
opacity: 0.25;
107107
}
108+
}
108109

109-
&:active .dialog-drag-handle-icon {
110-
color: #eb0000;
111-
opacity: 0.5;
110+
.dialog-drag-and-close-handle-area:hover {
111+
.dialog-drag-handle-icon {
112+
transform: translate(-12px, 230px);
113+
pointer-events: none;
112114
}
113115
}
114116

115-
::ng-deep
116-
.trainrun-dialog-container:active
117-
~ .dialog-drag-and-close-handle-area
117+
.dialog-drag-and-close-handle-area:active {
118+
border: 116px solid rgba(0, 0, 0, 0);
119+
118120
.dialog-drag-handle-icon {
119-
color: #eb0000;
120-
opacity: 0.5;
121+
transform: translate(-112px, 130px);
122+
pointer-events: none;
123+
}
124+
125+
.dialog-close-button-icon {
126+
transform: translate(-114px, -160px);
127+
}
121128
}
122129

123130
.sbb-tab-group {

0 commit comments

Comments
 (0)