Skip to content

feat: use step value in litegraph to enable number type inputs for numbers #3926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/scripts/changeTracker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { LGraphCanvas, LiteGraph } from '@comfyorg/litegraph'
import type { PromptOptionalParams } from '@comfyorg/litegraph/dist/types/optionalParams'
import * as jsondiffpatch from 'jsondiffpatch'
import _ from 'lodash'
import log from 'loglevel'
Expand Down Expand Up @@ -277,14 +278,21 @@ export class ChangeTracker {
title: string,
value: any,
callback: (v: any) => void,
event: any
event: any,
optionalParams?: PromptOptionalParams
) {
const extendedCallback = (v: any) => {
callback(v)
checkState()
}
logger.debug('checkState on prompt')
return prompt.apply(this, [title, value, extendedCallback, event])
return prompt.apply(this, [
title,
value,
extendedCallback,
event,
optionalParams
])
}

// Handle litegraph context menu for COMBO widgets
Expand Down
Loading