mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-27 10:14:06 +00:00
Fix typos (#404)
* Fix typos: Interupt -> Interrupt * Fix typos: tempateManagerRow -> templateManagerRow * Fix some typos * Fix typos: Convertable -> Convertible * Fix some typos
This commit is contained in:
@@ -384,7 +384,7 @@ function getConfig(widgetName) {
|
||||
)
|
||||
}
|
||||
|
||||
function isConvertableWidget(widget, config) {
|
||||
function isConvertibleWidget(widget, config) {
|
||||
return (
|
||||
(VALID_TYPES.includes(widget.type) || VALID_TYPES.includes(config[0])) &&
|
||||
!widget.options?.forceInput
|
||||
@@ -485,7 +485,7 @@ function isValidCombo(combo, obj) {
|
||||
console.log(`connection rejected: tried to connect combo to ${obj}`)
|
||||
return false
|
||||
}
|
||||
// New imput combo has a different size
|
||||
// New input combo has a different size
|
||||
if (combo.length !== obj.length) {
|
||||
console.log(`connection rejected: combo lists dont match`)
|
||||
return false
|
||||
@@ -670,14 +670,14 @@ app.registerExtension({
|
||||
})
|
||||
},
|
||||
async beforeRegisterNodeDef(nodeType, nodeData, app) {
|
||||
// Add menu options to conver to/from widgets
|
||||
// Add menu options to convert to/from widgets
|
||||
const origGetExtraMenuOptions = nodeType.prototype.getExtraMenuOptions
|
||||
nodeType.prototype.convertWidgetToInput = function (widget) {
|
||||
const config = getConfig.call(this, widget.name) ?? [
|
||||
widget.type,
|
||||
widget.options || {}
|
||||
]
|
||||
if (!isConvertableWidget(widget, config)) return false
|
||||
if (!isConvertibleWidget(widget, config)) return false
|
||||
convertToInput(this, widget, config)
|
||||
return true
|
||||
}
|
||||
@@ -703,7 +703,7 @@ app.registerExtension({
|
||||
w.type,
|
||||
w.options || {}
|
||||
]
|
||||
if (isConvertableWidget(w, config)) {
|
||||
if (isConvertibleWidget(w, config)) {
|
||||
toInput.push({
|
||||
content: `Convert ${w.name} to input`,
|
||||
callback: () => convertToInput(this, w, config)
|
||||
|
||||
Reference in New Issue
Block a user