From e7e417f40df71e9b3d32a59bc2522d1f1a2a0121 Mon Sep 17 00:00:00 2001 From: FacerAin Date: Thu, 10 Aug 2023 19:57:38 +0900 Subject: [PATCH] feat: fix blueprint node id --- src/components/node/NodePlane.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/node/NodePlane.vue b/src/components/node/NodePlane.vue index 784abd3..c0a754d 100644 --- a/src/components/node/NodePlane.vue +++ b/src/components/node/NodePlane.vue @@ -74,6 +74,7 @@ watch(blueprintNodes, (newValue, oldValue) => { if (newValue) { let nodeData = newValue; addNodes(nodeData); + id += getNodes.value.length; } }); @@ -92,7 +93,6 @@ function onDrop(event) { position, label: `${type} node`, }; - addNodes([newNode]); // align node position after drop, so it's centered to the mouse @@ -134,6 +134,7 @@ const exportAndOpenModal = () => { }); exportData.value = JSON.stringify(exportDataArr); showModal.value = true; + if (btnData.value === 'create') { axios .post('/terraform/usertf', exportData.value)