Randomize seed in a hackish way
This commit is contained in:
@@ -26,7 +26,7 @@ export default abstract class ComfyWidget<T = any, V = any> implements IWidget<T
|
||||
|
||||
setValue(value: V) {
|
||||
this.value = value;
|
||||
widgetState.widgetStateChanged(this);
|
||||
widgetState.widgetStateChanged(this.node.id, this);
|
||||
}
|
||||
|
||||
draw?(ctx: CanvasRenderingContext2D, node: LGraphNode, width: number, posY: number, height: number): void;
|
||||
|
||||
@@ -6,10 +6,13 @@
|
||||
let itemValue: WidgetUIStateStore | null = null;
|
||||
let option: number | null = null;
|
||||
|
||||
$: if (item && !option) {
|
||||
if (!itemValue)
|
||||
itemValue = item.value;
|
||||
option = get(item.value)
|
||||
$: if (item) {
|
||||
itemValue = item.value;
|
||||
updateOption(); // don't react on option
|
||||
}
|
||||
|
||||
function updateOption() {
|
||||
option = get(itemValue);
|
||||
}
|
||||
|
||||
function onRelease(e: Event) {
|
||||
|
||||
Reference in New Issue
Block a user