Skip to content

Commit 60b21b1

Browse files
committed
1 parent e52da39 commit 60b21b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/logger-ui.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ const onStartMovingWidget = (( ) => {
101101

102102
const move = ( ) => {
103103
timer = undefined;
104-
const l1 = Math.min(Math.max(l0 + mx1 - mx0, 0), pw - cw);
104+
const l1 = Math.min(Math.max(l0 + mx1 - mx0, 0), Math.max(pw - cw, 0));
105105
if ( (l1+cw/2) < (pw/2) ) {
106106
widget.style.left = `${l1/pw*100}%`;
107107
widget.style.right = '';
108108
} else {
109109
widget.style.right = `${(pw-l1-cw)/pw*100}%`;
110110
widget.style.left = '';
111111
}
112-
const t1 = Math.min(Math.max(t0 + my1 - my0, 0), ph - ch);
112+
const t1 = Math.min(Math.max(t0 + my1 - my0, 0), Math.max(ph - ch, 0));
113113
widget.style.top = `${t1/ph*100}%`;
114114
widget.style.bottom = '';
115115
};

0 commit comments

Comments
 (0)