stormvogel.layout_editor¶
Interactive layout editor for Stormvogel layouts using ipywidgets.
Implemented using the DictEditor from dict_editor.py, some clarifications:
Layout stores and manages loading/saving of the layout file, and the schema file.
DictEditor creates an editor from a schema and a dict to be edited.
LayoutEditor creates a DictEditor using the schema stored in layouts/schema.json. It also processes what should happen when the user edits something in the layout editor or presses the save/load/reload buttons.
Classes¶
Abstract class for displaying something. |
Module Contents¶
- class stormvogel.layout_editor.LayoutEditor(layout: stormvogel.layout.Layout, visualization: stormvogel.visualization.JSVisualization | None = None, output: ipywidgets.Output | None = None, do_display: bool = True, debug_output: ipywidgets.Output = widgets.Output())¶
Bases:
stormvogel.displayable.DisplayableAbstract class for displaying something.
- vis: stormvogel.visualization.JSVisualization | None = None¶
- layout: stormvogel.layout.Layout¶
- loaded: bool = False¶
- editor¶
- save_node_positions()¶
Try to save the positions of the nodes in the graph to the layout. The user is informed if this fails.
- process_save_button()¶
Triggered whenever something is changed in the layout editor, but only does something if the save button was pressed.
- process_load_button()¶
Triggered whenever something is changed in the layout editor, but only does something if the load button was pressed.
- process_reload_button()¶
Triggered whenever something is changed in the layout editor, but only does something if the reload button was pressed.
- try_update()¶
Process the updates from the layout editor where required.
- show() None¶
Display an interactive layout editor, according to the schema.
- __warn_failed_positions_save()¶