Skip to content

Commit

Permalink
removing lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
HMNS19 committed Feb 18, 2025
1 parent da8d67b commit d771f7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mesa/visualization/solara_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,15 @@ def SolaraViz(
if reactive_use_threads.value:
solara.Text("Increase play interval to avoid skipping plots")

def set_reactive_use_threads(value):
reactive_use_threads.set(value)

solara.Checkbox(
label="Use Threads",
value=reactive_use_threads,
on_value=lambda v: reactive_use_threads.set(v),
on_value=set_reactive_use_threads,
)

if not isinstance(simulator, Simulator):
ModelController(
model,
Expand Down

0 comments on commit d771f7f

Please sign in to comment.