LoadAudio restores file value from workflow (#4043)
* LoadAudio restores file value from workflow * use onAfterGraphConfigured * Don't use anonnymous function
This commit is contained in:
parent
ff6ca2a892
commit
011b11d8d7
|
@ -149,6 +149,15 @@ app.registerExtension({
|
|||
}
|
||||
audioWidget.callback = onAudioWidgetUpdate
|
||||
|
||||
// Load saved audio file widget values if restoring from workflow
|
||||
const onGraphConfigured = node.onGraphConfigured;
|
||||
node.onGraphConfigured = function() {
|
||||
onGraphConfigured?.apply(this, arguments)
|
||||
if (audioWidget.value) {
|
||||
onAudioWidgetUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
const fileInput = document.createElement("input")
|
||||
fileInput.type = "file"
|
||||
fileInput.accept = "audio/*"
|
||||
|
|
Loading…
Reference in New Issue