Canvas: Check if network supports auto
Change-Id: I19e06b70e3e1a59f6549fcf01b565bad8a7f5695
diff --git a/apps/canvas/front/src/components/actions.tsx b/apps/canvas/front/src/components/actions.tsx
index 83b40e1..087d96e 100644
--- a/apps/canvas/front/src/components/actions.tsx
+++ b/apps/canvas/front/src/components/actions.tsx
@@ -154,9 +154,8 @@
}, [projectId, instance, store]);
const clear = useCallback(() => {
store.setEdges([]);
- store.setNodes([]);
- instance.setViewport({ x: 0, y: 0, zoom: 1 });
- }, [store, instance]);
+ store.setNodes(store.nodes.filter((n) => n.type === "network"));
+ }, [store]);
const edit = useCallback(async () => {
store.setMode("edit");
}, [store]);