mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-26 11:52:42 -08:00
resize handle for extra networks
This commit is contained in:
parent
c8a5322d1f
commit
44bce3c74e
6 changed files with 51 additions and 9 deletions
|
|
@ -447,7 +447,24 @@ function extraNetworksControlTreeViewOnClick(event, tabname, extra_networks_tabn
|
|||
* @param tabname The name of the active tab in the sd webui. Ex: txt2img, img2img, etc.
|
||||
* @param extra_networks_tabname The id of the active extraNetworks tab. Ex: lora, checkpoints, etc.
|
||||
*/
|
||||
gradioApp().getElementById(tabname + "_" + extra_networks_tabname + "_tree").classList.toggle("hidden");
|
||||
const tree = gradioApp().getElementById(tabname + "_" + extra_networks_tabname + "_tree");
|
||||
const parent = tree.parentElement;
|
||||
let resizeHandle = parent.querySelector('.resize-handle');
|
||||
tree.classList.toggle("hidden");
|
||||
|
||||
if (tree.classList.contains("hidden")){
|
||||
tree.style.display = 'none';
|
||||
resizeHandle.style.display = 'none';
|
||||
parent.style.display = 'flex';
|
||||
} else {
|
||||
tree.style.display = 'block';
|
||||
if (!resizeHandle) {
|
||||
setupResizeHandle(parent);
|
||||
resizeHandle = parent.querySelector('.resize-handle');
|
||||
}
|
||||
resizeHandle.style.display = 'block';
|
||||
parent.style.display = 'grid';
|
||||
}
|
||||
event.currentTarget.classList.toggle("extra-network-control--enabled");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue