Skip to content

Commit

Permalink
fix for inc and dec buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
daswer123 committed Mar 1, 2024
1 parent 7362682 commit b221123
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions javascript/canvas-zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ onUiLoaded(async () => {
`${elemId} input[aria-label='Brush radius']`
) ||
gradioApp().querySelector(`${elemId} button[aria-label="Use brush"]`);

if (input) {
input.click();
if (!withoutValue) {
Expand Down Expand Up @@ -1105,8 +1105,8 @@ onUiLoaded(async () => {
[hotkeysConfig.canvas_zoom_hotkey_fill]: fillCanvasWithColor,
[hotkeysConfig.canvas_zoom_hotkey_transparency]: toggleOpacityMode,
[hotkeysConfig.canvas_zoom_hotkey_undo]: undoLastAction,
[hotkeysConfig.canvas_zoom_inc_brush_size]: () => adjustBrushSize(elemId, 100, false,hotkeysConfig.canvas_zoom_brush_size_change),
[hotkeysConfig.canvas_zoom_dec_brush_size]: () => adjustBrushSize(elemId, -100, false,hotkeysConfig.canvas_zoom_brush_size_change),
[hotkeysConfig.canvas_zoom_dec_brush_size]: () => adjustBrushSize(elemId, 100, false,hotkeysConfig.canvas_zoom_brush_size_change),
[hotkeysConfig.canvas_zoom_inc_brush_size]: () => adjustBrushSize(elemId, -100, false,hotkeysConfig.canvas_zoom_brush_size_change),
};

const action = hotkeyActions[event.code];
Expand Down

0 comments on commit b221123

Please sign in to comment.