mirror of
https://github.com/jags111/efficiency-nodes-comfyui.git
synced 2026-03-21 21:22:13 -03:00
fix #46
This commit is contained in:
@@ -77,9 +77,9 @@ const ext = {
|
|||||||
name: "efficiency.appearance",
|
name: "efficiency.appearance",
|
||||||
|
|
||||||
nodeCreated(node) {
|
nodeCreated(node) {
|
||||||
const title = node.getTitle();
|
const nclass = node.comfyClass;
|
||||||
if (NODE_COLORS.hasOwnProperty(title)) {
|
if (NODE_COLORS.hasOwnProperty(nclass)) {
|
||||||
let colorKey = NODE_COLORS[title];
|
let colorKey = NODE_COLORS[nclass];
|
||||||
|
|
||||||
if (colorKey === "random") {
|
if (colorKey === "random") {
|
||||||
// Check for a valid color key before popping
|
// Check for a valid color key before popping
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const NODE_WIDGET_MAP = {
|
|||||||
const SPECIFIC_WIDTH = 325; // Set to desired width
|
const SPECIFIC_WIDTH = 325; // Set to desired width
|
||||||
|
|
||||||
function setNodeWidthForMappedTitles(node) {
|
function setNodeWidthForMappedTitles(node) {
|
||||||
if (NODE_WIDGET_MAP[node.getTitle()]) {
|
if (NODE_WIDGET_MAP[node.comfyClass]) {
|
||||||
node.setSize([SPECIFIC_WIDTH, node.size[1]]);
|
node.setSize([SPECIFIC_WIDTH, node.size[1]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ function handleInputModeWidgetsVisibility(node, inputModeValue) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const inputModeVisibilityMap = nodeVisibilityMap[node.getTitle()];
|
const inputModeVisibilityMap = nodeVisibilityMap[node.comfyClass];
|
||||||
|
|
||||||
if (!inputModeVisibilityMap || !inputModeVisibilityMap[inputModeValue]) return;
|
if (!inputModeVisibilityMap || !inputModeVisibilityMap[inputModeValue]) return;
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ const nodeWidgetHandlers = {
|
|||||||
// In the main function where widgetLogic is called
|
// In the main function where widgetLogic is called
|
||||||
function widgetLogic(node, widget) {
|
function widgetLogic(node, widget) {
|
||||||
// Retrieve the handler for the current node title and widget name
|
// Retrieve the handler for the current node title and widget name
|
||||||
const handler = nodeWidgetHandlers[node.getTitle()]?.[widget.name];
|
const handler = nodeWidgetHandlers[node.comfyClass]?.[widget.name];
|
||||||
if (handler) {
|
if (handler) {
|
||||||
handler(node, widget);
|
handler(node, widget);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user