Skip to content

Commit a385d17

Browse files
rlskoesertpike3
authored andcommitted
Use Solara markdown instead of int text to display step count
1 parent 4085d6b commit a385d17

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

mesa/experimental/jupyter_viz.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def make_model():
183183

184184
# 4. Status indicators
185185
#: current round step count
186-
step = solara.use_reactive(False)
186+
step = solara.use_reactive(True)
187187

188188
def on_value_play(change):
189189
if viz.model.running:
@@ -212,12 +212,7 @@ def on_value_play(change):
212212
playing=playing.value,
213213
on_playing=playing.set,
214214
)
215-
widgets.IntText(
216-
value=step.value,
217-
description="Step:",
218-
disabled=True,
219-
interval=play_interval,
220-
)
215+
solara.Markdown(md_text="**Step:** %d" % step.value)
221216
# threaded_do_play is not used for now because it
222217
# doesn't work in Google colab. We use
223218
# ipywidgets.Play until it is fixed. The threading

0 commit comments

Comments
 (0)