Skip to content

Updated nodealign.js to address display issue#29

Open
Atom8403 wants to merge 2 commits intokk8bit:mainfrom
Atom8403:main
Open

Updated nodealign.js to address display issue#29
Atom8403 wants to merge 2 commits intokk8bit:mainfrom
Atom8403:main

Conversation

@Atom8403
Copy link

Fixed iconColor scope: moved variable declarations outside the try block so they're accessible throughout the function
Enhanced CSS: added !important flags and default positioning for floating mode
Forced visibility: set visibility: visible, opacity: 1, and z-index: 10000 directly on the element
Added minimum dimensions: minWidth: 200px and minHeight: 32px to prevent zero-size toolbar
Added diagnostic logging: logs computed styles, position, and dimensions when show() is called
Improved positioning: handles zero-dimension case and uses a default centered position

Fixed iconColor scope: moved variable declarations outside the try block so they're accessible throughout the function
Enhanced CSS: added !important flags and default positioning for floating mode
Forced visibility: set visibility: visible, opacity: 1, and z-index: 10000 directly on the element
Added minimum dimensions: minWidth: 200px and minHeight: 32px to prevent zero-size toolbar
Added diagnostic logging: logs computed styles, position, and dimensions when show() is called
Improved positioning: handles zero-dimension case and uses a default centered position
@Atom8403
Copy link
Author

I updated the nodealign.js to resolve the issue of it not displaying after the latest ComfyUI update

The toolbar should now:
Hide when no nodes are selected in "on-select" mode
Show only when 2+ nodes are selected
Stay properly positioned on-screen (not cut off) *This was happening when i was working on hiding and showing the bar
Respect the display mode setting
The fix was using setProperty() with the important flag and adding a CSS class with higher specificity to override the base display: flex !important; rule.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant