diff --git a/src/composables/widgets/useIntWidget.ts b/src/composables/widgets/useIntWidget.ts index e1abb4501..289a36071 100644 --- a/src/composables/widgets/useIntWidget.ts +++ b/src/composables/widgets/useIntWidget.ts @@ -40,7 +40,7 @@ export const useIntWidget = () => { inputName, val, 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 if (isNaN(sh)) { sh = 0 diff --git a/src/utils/mathUtil.ts b/src/utils/mathUtil.ts index 99302b14a..d29895278 100644 --- a/src/utils/mathUtil.ts +++ b/src/utils/mathUtil.ts @@ -27,6 +27,14 @@ export function getNumberDefaults( return { 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 + } } }