From 265c796af7d8132b453dc2f406c4b081af749dfa Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Wed, 11 Jun 2025 13:19:21 +0530 Subject: add pins while parsing --- blocks/eda-frontend/public/geometry.xsl | 14 ++++++++------ .../src/components/SchematicEditor/Helper/ToolbarTools.js | 13 ++++++++++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/blocks/eda-frontend/public/geometry.xsl b/blocks/eda-frontend/public/geometry.xsl index d36ebc34..7b535725 100644 --- a/blocks/eda-frontend/public/geometry.xsl +++ b/blocks/eda-frontend/public/geometry.xsl @@ -14,6 +14,7 @@ + @@ -91,8 +92,9 @@ + - + @@ -202,9 +204,9 @@ - + - + @@ -314,9 +316,9 @@ - + - + @@ -515,6 +517,6 @@ - + diff --git a/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js b/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js index 9ffa25ed..b4fc9aa2 100644 --- a/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js +++ b/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js @@ -446,6 +446,14 @@ function parseXmlToGraph (xmlDoc, graph) { v1.controlPorts = 0 v1.commandPorts = 0 v1.simulationFunction = cellAttrs.simulationFunction?.value + v1.pins = { + explicitInputPorts: [], + implicitInputPorts: [], + controlPorts: [], + explicitOutputPorts: [], + implicitOutputPorts: [], + commandPorts: [] + } const SuperBlockDiagram = cell.querySelector('SuperBlockDiagram') if (SuperBlockDiagram !== null) { v1.SuperBlockDiagram = SuperBlockDiagram @@ -487,7 +495,7 @@ function parseXmlToGraph (xmlDoc, graph) { console.log('rotation:', styleObject, rotation, xPos, yPos, portSize, rotationParameters) } - getPins(stylename, v1) + const pins = getPins(stylename, v1) const pointXY = getPointXY(rotationParameters) const pointX = pointXY.pointX @@ -521,6 +529,9 @@ function parseXmlToGraph (xmlDoc, graph) { vp.ordering = ordering vp.ParentComponent = v1.id + if (pins != null) { + pins.push(vp) + } } else if (cellAttrs.edge) { // is edge const edgeId = cellAttrs.id.value -- cgit