From 85e2a4c48a0615b87fa90cf35bd31904d9d66642 Mon Sep 17 00:00:00 2001 From: srivastava9 Date: Sat, 14 Mar 2020 21:30:19 +0530 Subject: [PATCH] two input node give error --- .../scenes/a/components/assets/BodyWidget.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tensormap-client/src/pages/dashboard/scenes/a/components/assets/BodyWidget.tsx b/tensormap-client/src/pages/dashboard/scenes/a/components/assets/BodyWidget.tsx index 3313602f..a6038207 100644 --- a/tensormap-client/src/pages/dashboard/scenes/a/components/assets/BodyWidget.tsx +++ b/tensormap-client/src/pages/dashboard/scenes/a/components/assets/BodyWidget.tsx @@ -468,14 +468,26 @@ class BodyWidget extends React.Component { event => { var data = JSON.parse(event.dataTransfer.getData("storm-diagram-node")); var node = null; + var is_true=true; + var old_nodes =this.props.app.getDiagramEngine().getDiagramModel().serializeDiagram().nodes; if (data.name === "inp_layer") { + for(var i=0;i { wight: 0.5 } } + if(node != null){ var points = this.props.app.getDiagramEngine().getRelativeMousePoint(event); node.x = points.x; node.y = points.y; @@ -501,7 +514,7 @@ class BodyWidget extends React.Component { .getDiagramModel() .addNode(node); this.forceUpdate(); - } + }} } onDragOver = { event => {