mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 10:25:16 +00:00
display_as -> display.
This commit is contained in:
parent
730a5d170f
commit
076d2db60f
@ -250,20 +250,20 @@ function addMultilineWidget(node, name, opts, app) {
|
|||||||
return { minWidth: 400, minHeight: 200, widget };
|
return { minWidth: 400, minHeight: 200, widget };
|
||||||
}
|
}
|
||||||
|
|
||||||
function isSlider(display_as) {
|
function isSlider(display) {
|
||||||
return (display_as==="slider") ? "slider" : "number"
|
return (display==="slider") ? "slider" : "number"
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ComfyWidgets = {
|
export const ComfyWidgets = {
|
||||||
"INT:seed": seedWidget,
|
"INT:seed": seedWidget,
|
||||||
"INT:noise_seed": seedWidget,
|
"INT:noise_seed": seedWidget,
|
||||||
FLOAT(node, inputName, inputData) {
|
FLOAT(node, inputName, inputData) {
|
||||||
let widgetType = isSlider(inputData[1]["display_as"]);
|
let widgetType = isSlider(inputData[1]["display"]);
|
||||||
const { val, config } = getNumberDefaults(inputData, 0.5);
|
const { val, config } = getNumberDefaults(inputData, 0.5);
|
||||||
return { widget: node.addWidget(widgetType, inputName, val, () => {}, config) };
|
return { widget: node.addWidget(widgetType, inputName, val, () => {}, config) };
|
||||||
},
|
},
|
||||||
INT(node, inputName, inputData) {
|
INT(node, inputName, inputData) {
|
||||||
let widgetType = isSlider(inputData[1]["display_as"]);
|
let widgetType = isSlider(inputData[1]["display"]);
|
||||||
const { val, config } = getNumberDefaults(inputData, 1);
|
const { val, config } = getNumberDefaults(inputData, 1);
|
||||||
Object.assign(config, { precision: 0 });
|
Object.assign(config, { precision: 0 });
|
||||||
return {
|
return {
|
||||||
@ -276,7 +276,7 @@ export const ComfyWidgets = {
|
|||||||
this.value = Math.round(v / s) * s;
|
this.value = Math.round(v / s) * s;
|
||||||
},
|
},
|
||||||
config
|
config
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
TOGGLE(node, inputName, inputData) {
|
TOGGLE(node, inputName, inputData) {
|
||||||
|
Loading…
Reference in New Issue
Block a user