Browse Source

Fix potential issues with the int rounding fix.

pull/2386/merge
comfyanonymous 7 months ago
parent
commit
daa92a8ff4
  1. 6
      web/scripts/widgets.js

6
web/scripts/widgets.js

@ -229,7 +229,11 @@ function createIntWidget(node, inputName, inputData, app, isSeedInput) {
val,
function (v) {
const s = this.options.step / 10;
this.value = Math.round((v - this.options.min) / s) * s + this.options.min;
let sh = this.options.min % s;
if (isNaN(sh)) {
sh = 0;
}
this.value = Math.round((v - sh) / s) * s + sh;
},
config
),

Loading…
Cancel
Save