mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 18:52:19 +00:00
Remove magic 10% scale on numeric widget step (#2759)
This commit is contained in:
@@ -40,7 +40,7 @@ export const useIntWidget = () => {
|
|||||||
inputName,
|
inputName,
|
||||||
val,
|
val,
|
||||||
function (this: INumericWidget, v: number) {
|
function (this: INumericWidget, v: number) {
|
||||||
const s = (this.options.step ?? 1) / 10
|
const s = this.options.step2 || 1
|
||||||
let sh = (this.options.min ?? 0) % s
|
let sh = (this.options.min ?? 0) % s
|
||||||
if (isNaN(sh)) {
|
if (isNaN(sh)) {
|
||||||
sh = 0
|
sh = 0
|
||||||
|
|||||||
@@ -27,6 +27,14 @@ export function getNumberDefaults(
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
val: defaultVal,
|
val: defaultVal,
|
||||||
config: { min, max, step: 10.0 * step, round, precision }
|
config: {
|
||||||
|
min,
|
||||||
|
max,
|
||||||
|
/** @deprecated Use step2 instead. The 10x value is a legacy implementation. */
|
||||||
|
step: step * 10.0,
|
||||||
|
step2: step,
|
||||||
|
round,
|
||||||
|
precision
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user