From fc7eb592b9215d849ae38283a97aa368db9b8392 Mon Sep 17 00:00:00 2001 From: "Egli Adrian (IT-SCI-API-PFI)" <adrian.egli@sbb.ch> Date: Wed, 19 Jun 2019 15:08:14 +0200 Subject: [PATCH] Update editor --- flatland/utils/editor.py | 4 ++-- notebooks/Scene_Editor.ipynb | 38 +++++------------------------------- 2 files changed, 7 insertions(+), 35 deletions(-) diff --git a/flatland/utils/editor.py b/flatland/utils/editor.py index 6137a07..6255a5e 100644 --- a/flatland/utils/editor.py +++ b/flatland/utils/editor.py @@ -96,7 +96,7 @@ class View(object): self.wRegenNAgents = IntSlider(value=1, min=0, max=5, step=1, description="# Agents", tip="Click regenerate or reset after changing this") - self.wRegenMethod = RadioButtons(description="Regen\nMethod", options=["Empty", "Random Cell", "Path-based"]) + self.wRegenMethod = RadioButtons(description="Regen\nMethod", options=["Empty", "Random Cell"]) # , "Path-based"]) self.wReplaceAgents = Checkbox(value=True, description="Replace Agents") self.wTab = Tab() @@ -104,7 +104,7 @@ class View(object): for i, title in enumerate(tab_contents): self.wTab.set_title(i, title) self.wTab.children = [ - VBox([self.wRegenSizeWidth, self.wRegenSizeHeight, self.wRegenNAgents]) + VBox([self.wRegenSizeWidth, self.wRegenSizeHeight, self.wRegenNAgents, self.wRegenMethod]) ] # abbreviated description of buttons and the methods they call diff --git a/notebooks/Scene_Editor.ipynb b/notebooks/Scene_Editor.ipynb index cf4deeb..9ed6baf 100644 --- a/notebooks/Scene_Editor.ipynb +++ b/notebooks/Scene_Editor.ipynb @@ -9,22 +9,9 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<style>.container { width:95% !important; }</style>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "from IPython.core.display import display, HTML\n", "display(HTML(\"<style>.container { width:95% !important; }</style>\"))" @@ -32,7 +19,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -62,26 +49,11 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": { "scrolled": false }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "a1b27bcebefc4ddebb5bde8297d52d9e", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "HBox(children=(Canvas(), VBox(children=(Text(value='temp.pkl', description='Filename'), Button(description='Re…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "mvc.view.display()" ] -- GitLab