-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The big challenge for Panel ReactFlow is that there is no autolayout. That will make it much harder to use than competitors like daggr.
Please add autolayout.
If I remove the position I see
TypeError: Cannot read properties of undefined (reading 'x')import panel as pn
from panel_reactflow import NodeType, ReactFlow
pn.extension("jsoneditor")
task_schema = {
"type": "object",
"properties": {
"status": {"type": "string", "enum": ["idle", "running", "done"]},
"priority": {"type": "integer"},
},
}
nodes = [
{"id": "start", "type": "task", "label": "Start", "data": {"status": "idle"}},
{"id": "finish", "type": "task", "label": "Finish", "position": {"x": 100, "y": 60}, "data": {"status": "done"}},
]
edges = [{"id": "e1", "source": "start", "target": "finish"}]
flow = ReactFlow(
nodes=nodes,
edges=edges,
node_types={"task": NodeType(type="task", label="Task", schema=task_schema)},
editor_mode="node",
sizing_mode="stretch_both",
)
flow.servable()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels