Skip to content

Commit

Permalink
Honor disabled space drawer when rendering in the browser
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser authored and tpike3 committed Dec 16, 2023
1 parent ca5e8f9 commit a97a483
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mesa/experimental/jupyter_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ def render_in_jupyter():
make_plot(model, measure)

def render_in_browser():
# if space drawer is disabled, do not include it
layout_types = [{"Space": "default"}] if space_drawer else []

if measures:
layout_types = [{"Space": "default"}] + [
{"Measure": elem} for elem in range(len(measures))
]
else:
layout_types = [{"Space": "default"}]
layout_types += [{"Measure": elem} for elem in range(len(measures))]

grid_layout_initial = get_initial_grid_layout(layout_types=layout_types)
grid_layout, set_grid_layout = solara.use_state(grid_layout_initial)

Expand Down

0 comments on commit a97a483

Please sign in to comment.