mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 08:44: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:
@@ -184,7 +184,7 @@ class ManageTemplates extends ComfyDialog {
|
||||
'div',
|
||||
{
|
||||
dataset: { id: i.toString() },
|
||||
className: 'tempateManagerRow',
|
||||
className: 'templateManagerRow',
|
||||
style: {
|
||||
display: 'grid',
|
||||
gridTemplateColumns: '1fr auto',
|
||||
@@ -206,7 +206,7 @@ class ManageTemplates extends ComfyDialog {
|
||||
|
||||
// rearrange the elements
|
||||
this.element
|
||||
.querySelectorAll('.tempateManagerRow')
|
||||
.querySelectorAll('.templateManagerRow')
|
||||
.forEach((el: HTMLElement, i) => {
|
||||
var prev_i = Number.parseInt(el.dataset.id)
|
||||
|
||||
@@ -329,7 +329,7 @@ class ManageTemplates extends ComfyDialog {
|
||||
var that = this
|
||||
setTimeout(function () {
|
||||
that.element
|
||||
.querySelectorAll('.tempateManagerRow')
|
||||
.querySelectorAll('.templateManagerRow')
|
||||
.forEach((el: HTMLElement, i) => {
|
||||
el.dataset.id = i.toString()
|
||||
})
|
||||
|
||||
@@ -256,7 +256,7 @@ app.registerExtension({
|
||||
{
|
||||
// naming is inverted with respect to LiteGraphNode.horizontal
|
||||
// LiteGraphNode.horizontal == true means that
|
||||
// each slot in the inputs and outputs are layed out horizontally,
|
||||
// each slot in the inputs and outputs are laid out horizontally,
|
||||
// which is the opposite of the visual orientation of the inputs and outputs as a node
|
||||
content:
|
||||
'Set ' + (this.properties.horizontal ? 'Horizontal' : 'Vertical'),
|
||||
|
||||
@@ -130,7 +130,7 @@ app.registerExtension({
|
||||
|
||||
// LiteGraph will call group.move both on mouse-move as well as mouse-up though we only want
|
||||
// to snap on a mouse-up which we can determine by checking if `app.canvas.last_mouse_dragging`
|
||||
// has been set to `false`. Essentially, this check here is the equivilant to calling an
|
||||
// has been set to `false`. Essentially, this check here is the equivalent to calling an
|
||||
// `LGraphGroup.prototype.onNodeMoved` if it had existed.
|
||||
if (app.canvas.last_mouse_dragging === false && app.shiftDown) {
|
||||
// After moving a group (while app.shiftDown), snap all the child nodes and, finally,
|
||||
|
||||
@@ -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