Skip to content

Commit

Permalink
Update ui_mixlab.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowcz007 committed Aug 29, 2024
1 parent 9aecc2c commit e976413
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions web/javascript/ui_mixlab.js
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,9 @@ app.registerExtension({

LGraphCanvas.prototype.text2text = async function (node) {
let widget = node.widgets.filter(
w => w.name === 'text' && typeof w.value == 'string'
w =>
(w.name === 'text' || w.name === 'prompt') &&
typeof w.value == 'string'
)[0]
if (widget) {
app.canvas.centerOnNode(node)
Expand Down Expand Up @@ -1653,7 +1655,9 @@ app.registerExtension({

if (node.widgets) {
let text_widget = node.widgets.filter(
w => w.name === 'text' && typeof w.value == 'string'
w =>
(w.name === 'text' || w.name === 'prompt') &&
typeof w.value == 'string'
)

let text_input = node.inputs?.filter(
Expand Down

0 comments on commit e976413

Please sign in to comment.