This commit is contained in:
w-e-w 2024-11-20 06:09:01 +09:00
parent 96eaca6153
commit 3a1497aaf1

View File

@ -483,7 +483,7 @@ onUiLoaded(async() => {
(deltaY > 0 ? -changeAmount : changeAmount);
input.value = Math.min(Math.max(newValue, 0), maxValue);
} else {
const brush_factor = deltaY > 0 ? 1 - opts.canvas_hotkey_brush_factor : 1 + opts.canvas_hotkey_brush_factor
const brush_factor = deltaY > 0 ? 1 - opts.canvas_hotkey_brush_factor : 1 + opts.canvas_hotkey_brush_factor;
const currentRadius = parseFloat(input.value);
let delta = Math.sqrt(currentRadius ** 2 * brush_factor) - currentRadius;
// gradio seems to have a minimum brush size step of 1