mirror of
https://github.com/altoiddealer/--sd-webui-ar-plusplus.git
synced 2026-01-26 11:09:52 +00:00
Move click functions
This commit is contained in:
@@ -474,6 +474,24 @@ class AspectRatioScript(scripts.Script):
|
||||
outputs=resolution,
|
||||
)
|
||||
|
||||
def _arc_show_logic_update():
|
||||
global is_reverse_logic_mode
|
||||
is_reverse_logic_mode = not is_reverse_logic_mode
|
||||
|
||||
return [
|
||||
|
||||
arc_show_logic.update(visible=False),
|
||||
arc_hide_logic.update(visible=True),
|
||||
]
|
||||
|
||||
def _arc_hide_logic_update():
|
||||
global is_reverse_logic_mode
|
||||
is_reverse_logic_mode = not is_reverse_logic_mode
|
||||
return [
|
||||
arc_show_logic.update(visible=True),
|
||||
arc_hide_logic.update(visible=False),
|
||||
]
|
||||
|
||||
# Show calculator pane (and reset number input values)
|
||||
arc_show_calculator.click(
|
||||
lambda: [
|
||||
@@ -509,26 +527,6 @@ class AspectRatioScript(scripts.Script):
|
||||
[arc_panel, arc_show_calculator, arc_hide_calculator],
|
||||
)
|
||||
|
||||
|
||||
def _arc_show_logic_update():
|
||||
global is_reverse_logic_mode
|
||||
is_reverse_logic_mode = not is_reverse_logic_mode
|
||||
|
||||
return [
|
||||
|
||||
arc_show_logic.update(visible=False),
|
||||
arc_hide_logic.update(visible=True),
|
||||
]
|
||||
|
||||
|
||||
def _arc_hide_logic_update():
|
||||
global is_reverse_logic_mode
|
||||
is_reverse_logic_mode = not is_reverse_logic_mode
|
||||
return [
|
||||
arc_show_logic.update(visible=True),
|
||||
arc_hide_logic.update(visible=False),
|
||||
]
|
||||
|
||||
arc_show_logic.click(
|
||||
_arc_show_logic_update,
|
||||
None,
|
||||
|
||||
Reference in New Issue
Block a user