2.2 KiB
2.2 KiB
Align Toolbar
- Status: stable
- Scope: persistent action bar alignment controls, selection handling, and current behavioral constraints
- Applies to:
web/js/align_panel.js,web/js/align_icons.js,web/js/align_panel.css - Source of truth level: feature
- Last verified commit: 9bb835c68f9a68ecccdbeae32bd41382a1eb3556
- Update when: action set, toolbar behavior, tooltip policy, selection policy, or mounting strategy changes
- Supersedes: none
- Superseded by: none
Purpose
This subsystem owns the persistent alignment toolbar injected into the built-in ComfyUI action bar.
Current scope
The current implementation provides:
- six alignment actions
- persistent mounting into the built-in action bar, to the left of the standard controls
- support for mixed selection of nodes, groups, and reroute dots
- native browser tooltip text using the button
titleattribute - flat frontend asset layout under
web/js/
Current important constraints
The current design intentionally does not:
- provide a toggleable panel UI
- provide hotkey-driven overlay behavior
- maintain disabled-state UI for insufficient selection
- use custom tooltip DOM or theme-specific tooltip components
- use a
web/js/align/subfolder
Upstream-sensitive touchpoints
This feature is currently sensitive to:
- the action bar DOM structure and selector used to find the queue overlay button
- current LiteGraph selection containers (
selectedItems,selected_nodes,selected_group) - current geometry properties (
boundingRect,_bounding,bounding,pos,size) - current movement methods (
move,setPos)
What not to do
- Do not reintroduce a more complex panel implementation unless the task explicitly requires it.
- Do not replace native
titletooltips with a custom tooltip system casually. - Do not move the current flat asset files back into a feature subfolder without a repository-level reason.
- Do not broaden DOM observation or long-lived selection caching without clear need.
Regression surface
Re-check this subsystem when changing:
- action bar insertion logic
- item type detection for groups or reroutes
- geometry extraction logic
- selection flattening for selected groups and descendants
- tooltip behavior