mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-07-13 20:21:16 -03:00
fix(ui): prevent tags widget from auto-resizing in Vue mode when tags change
This commit is contained in:
@@ -133,6 +133,14 @@
|
|||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Vue node mode: prevent content from pushing node size via ResizeObserver.
|
||||||
|
Same technique as .lm-loras-container.lm-vue-node above. */
|
||||||
|
.comfy-tags-container.lm-vue-node {
|
||||||
|
height: 100%;
|
||||||
|
min-height: var(--comfy-widget-min-height, 150px);
|
||||||
|
contain: layout size;
|
||||||
|
}
|
||||||
|
|
||||||
.lm-lora-empty-state {
|
.lm-lora-empty-state {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { app } from "../../scripts/app.js";
|
import { app } from "../../scripts/app.js";
|
||||||
import { forwardMiddleMouseToCanvas, forwardWheelToCanvas } from "./utils.js";
|
import { forwardMiddleMouseToCanvas, forwardWheelToCanvas } from "./utils.js";
|
||||||
import { copyToClipboard } from "./loras_widget_utils.js";
|
import { copyToClipboard } from "./loras_widget_utils.js";
|
||||||
|
import { ensureLmStyles } from "./lm_styles_loader.js";
|
||||||
|
|
||||||
const MIN_HEIGHT = 150;
|
const MIN_HEIGHT = 150;
|
||||||
const GROUP_EDITOR_ID = "lm-trigger-group-editor";
|
const GROUP_EDITOR_ID = "lm-trigger-group-editor";
|
||||||
@@ -696,6 +697,16 @@ export function addTagsWidget(node, name, opts, callback, wheelSensitivity = 0.0
|
|||||||
outline: "none",
|
outline: "none",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Set a fixed minimum height so the node has a reasonable starting size.
|
||||||
|
// Adding or removing tags does NOT change the node size — the container
|
||||||
|
// scrolls when content exceeds the allocated space.
|
||||||
|
ensureLmStyles();
|
||||||
|
container.style.setProperty("--comfy-widget-min-height", `${MIN_HEIGHT}px`);
|
||||||
|
|
||||||
|
if (typeof LiteGraph !== "undefined" && LiteGraph.vueNodesMode) {
|
||||||
|
container.classList.add("lm-vue-node");
|
||||||
|
}
|
||||||
|
|
||||||
const initialTagsData = opts?.defaultVal || [];
|
const initialTagsData = opts?.defaultVal || [];
|
||||||
|
|
||||||
function renderSimpleTag(tagData, index, widget, showStrengthInfo) {
|
function renderSimpleTag(tagData, index, widget, showStrengthInfo) {
|
||||||
|
|||||||
Reference in New Issue
Block a user