Skip to content

Commit

Permalink
make "Adjust brush size by area" Default behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
w-e-w committed Nov 19, 2024
1 parent dd237f2 commit 96eaca6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ onUiLoaded(async() => {
if (!withoutValue) {
const maxValue =
parseFloat(input.getAttribute("max")) || 100;
if (opts.canvas_hotkey_brush_scale === "Radius") {
if (opts.canvas_hotkey_brush_factor_mode === "Radius") {
const changeAmount = maxValue * (percentage / 100);
const newValue =
parseFloat(input.value) +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"canvas_auto_expand": shared.OptionInfo(True, "Automatically expands an image that does not fit completely in the canvas area, similar to manually pressing the S and R buttons"),
"canvas_blur_prompt": shared.OptionInfo(False, "Take the focus off the prompt when working with a canvas"),
"canvas_disabled_functions": shared.OptionInfo(["Overlap"], "Disable function that you don't use", gr.CheckboxGroup, {"choices": ["Zoom", "Adjust brush size", "Hotkey enlarge brush", "Hotkey shrink brush", "Undo", "Clear", "Moving canvas", "Fullscreen", "Reset Zoom", "Overlap"]}),
"canvas_hotkey_brush_scale": shared.OptionInfo("Radius", "Brush scale", gr.Radio, {"choices": ["Radius", "Area"]}),
"canvas_hotkey_brush_factor_mode": shared.OptionInfo("Area", "Brush size adjustment mode", gr.Radio, {"choices": ["Area", "Radius"]}),
"canvas_hotkey_brush_factor": shared.OptionInfo(0.1, "Brush factor", gr.Slider, {"minimum": 0, "maximum": 2, "step": 0.01})
}))

0 comments on commit 96eaca6

Please sign in to comment.