This commit is contained in:
@@ -95,6 +95,8 @@ class _ComboBuilderTabState extends State<ComboBuilderTab> {
|
||||
_service.update(combo.copyWith(edges: edges));
|
||||
}
|
||||
|
||||
// Called once, when a drag ends — the canvas tracks positions itself
|
||||
// during the drag, so this can persist immediately.
|
||||
void _moveNode(Combo combo, String id, Offset position) {
|
||||
_service.update(
|
||||
combo.copyWith(
|
||||
@@ -103,7 +105,6 @@ class _ComboBuilderTabState extends State<ComboBuilderTab> {
|
||||
n.id == id ? n.copyWith(dx: position.dx, dy: position.dy) : n,
|
||||
],
|
||||
),
|
||||
persist: false,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -205,7 +206,6 @@ class _ComboBuilderTabState extends State<ComboBuilderTab> {
|
||||
GraphEdgeData(e.fromId, e.toId),
|
||||
],
|
||||
onNodeMoved: (id, pos) => _moveNode(combo, id, pos),
|
||||
onNodeDragEnd: (_) => _service.persistNow(),
|
||||
onConnect: (from, to) => _toggleEdge(combo, from, to),
|
||||
onNodeLongPress: (id) => _deleteNode(combo, id),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user