Offset timeline padding to avoid floating sidebar overlap
Detect whether the sidebar icon strip is in floating mode and on which side, then add matching padding so timeline markers aren't hidden behind it. Connected mode (sidebar pushes canvas) needs no offset. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0219d86301
commit
95cbcd4f6c
1 file changed
+10
@@ -1441,6 +1441,16 @@ function buildTimeline() {
|
|||||||
bar.appendChild(track);
|
bar.appendChild(track);
|
||||||
bar.appendChild(snapBtn);
|
bar.appendChild(snapBtn);
|
||||||
|
|
||||||
|
// Offset timeline to avoid floating sidebar overlap
|
||||||
|
const leftToolbar = document.querySelector(".comfyui-body-left .side-tool-bar-container");
|
||||||
|
const rightToolbar = document.querySelector(".comfyui-body-right .side-tool-bar-container");
|
||||||
|
if (leftToolbar && !leftToolbar.classList.contains("connected-sidebar")) {
|
||||||
|
bar.style.paddingLeft = "calc(var(--sidebar-width, 48px) + 16px)";
|
||||||
|
}
|
||||||
|
if (rightToolbar && !rightToolbar.classList.contains("connected-sidebar")) {
|
||||||
|
bar.style.paddingRight = "calc(var(--sidebar-width, 48px) + 16px)";
|
||||||
|
}
|
||||||
|
|
||||||
canvasParent.appendChild(bar);
|
canvasParent.appendChild(bar);
|
||||||
timelineEl = bar;
|
timelineEl = bar;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user