mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-17 14:07:00 +08:00
Fix dom widgets, dont show tooltip if not over canvas
This commit is contained in:
parent
7d991172d7
commit
48ea6a03e2
@ -95,9 +95,11 @@ app.registerExtension({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const onMouseMove = () => {
|
const onMouseMove = (e) => {
|
||||||
hideTooltip();
|
hideTooltip();
|
||||||
clearTimeout(idleTimeout);
|
clearTimeout(idleTimeout);
|
||||||
|
|
||||||
|
if(e.target.nodeName !== "CANVAS") return
|
||||||
idleTimeout = setTimeout(onIdle, 500);
|
idleTimeout = setTimeout(onIdle, 500);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -223,7 +223,8 @@ LGraphNode.prototype.addDOMWidget = function (name, type, element, options) {
|
|||||||
document.addEventListener("mousedown", mouseDownHandler);
|
document.addEventListener("mousedown", mouseDownHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
const tooltip = this.constructor.nodeData?.tooltips?.input[name];
|
const { nodeData } = this.constructor;
|
||||||
|
const tooltip = (nodeData?.input.required?.[name] ?? nodeData?.input.optional?.[name])?.[1]?.tooltip;
|
||||||
if (tooltip && !element.title) {
|
if (tooltip && !element.title) {
|
||||||
element.title = tooltip;
|
element.title = tooltip;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user