lynx.edit¶
- lynx.edit(diagram: Diagram, height: int = 400) LynxWidget[source]¶
Launch interactive widget to edit a diagram.
This is the recommended way to edit diagrams. The widget displays the diagram and any changes made in the UI are automatically saved to the diagram object.
- Parameters:
diagram – Diagram instance to edit
height – Widget height in pixels (default: 400)
- Returns:
LynxWidget instance (automatically displayed in Jupyter)
Examples
>>> import lynx >>> diagram = lynx.Diagram() >>> lynx.edit(diagram) # Launch editor >>> # Make changes in UI... >>> lynx.edit(diagram) # Re-launch with previous state
>>> # Custom height >>> lynx.edit(diagram, height=450)