Skip to content

Commit d36b7d6

Browse files
committed
Fix the Y positioning of the handle
- The additional translateY makes djdt.top=0 move the handle to the top of the browser window. - Because the handle is rotated we have to subtract its offsetWidth, not its offsetHeight to keep it in bounds at the bottom of the window.
1 parent 4e3d12f commit d36b7d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

debug_toolbar/static/debug_toolbar/css/toolbar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198

199199
#djDebug #djDebugToolbarHandle {
200200
position: fixed;
201-
transform: rotate(-90deg);
201+
transform: translateY(-100%) rotate(-90deg);
202202
transform-origin: right bottom;
203203
background-color: #fff;
204204
border: 1px solid #111;

debug_toolbar/static/debug_toolbar/js/toolbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ const djdt = {
222222
if (handleTop) {
223223
handleTop = Math.min(
224224
handleTop,
225-
window.innerHeight - handle.offsetHeight
225+
window.innerHeight - handle.offsetWidth
226226
);
227227
handle.style.top = handleTop + "px";
228228
}

0 commit comments

Comments
 (0)