diff options
author | Sunil Shetye | 2025-06-17 10:53:13 +0530 |
---|---|---|
committer | Sunil Shetye | 2025-06-18 20:51:40 +0530 |
commit | 9c8d1e15b1cb94970c20c27246e1ee10ad3b2ee3 (patch) | |
tree | ae747f1ad57bfc02a76af9db89ac8877ec5581f0 | |
parent | 76532f2eb53338469cf74f7abf5217d67def60fa (diff) | |
download | Common-Interface-Project-9c8d1e15b1cb94970c20c27246e1ee10ad3b2ee3.tar.gz Common-Interface-Project-9c8d1e15b1cb94970c20c27246e1ee10ad3b2ee3.tar.bz2 Common-Interface-Project-9c8d1e15b1cb94970c20c27246e1ee10ad3b2ee3.zip |
ignore port rotation when calculating its position
70 files changed, 54 insertions, 63 deletions
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js b/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js index 9ebb07f6..beaef60b 100644 --- a/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js +++ b/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js @@ -22,6 +22,8 @@ const { mxPoint } = new mxGraphFactory() +const DEBUG_PORT = false + export default function toolbarTools (grid) { graph = grid @@ -233,10 +235,7 @@ const PORTDIRECTIONS = { T2L: 15 } -export function getRotationParameters (stylename, rotation) { - const RotateNames = ['ExplicitInputPort', 'ControlPort', 'ExplicitOutputPort', 'CommandPort', - 'ExplicitInputPort', 'ControlPort', 'ExplicitOutputPort', 'CommandPort'] - +export function getRotationParameters (stylename) { let rotatename if (stylename === 'ImplicitInputPort') { rotatename = 'ExplicitInputPort' @@ -246,8 +245,6 @@ export function getRotationParameters (stylename, rotation) { rotatename = stylename } - let index = RotateNames.indexOf(rotatename) - let portdirection = PORTDIRECTIONS.UNK if (rotatename === 'ExplicitInputPort' || rotatename === 'ExplicitOutputPort') { portdirection = PORTDIRECTIONS.LOR @@ -255,15 +252,6 @@ export function getRotationParameters (stylename, rotation) { portdirection = PORTDIRECTIONS.TOB } - const turns = Math.round(rotation / 90) - - if (turns !== 0) { - index += turns - rotatename = RotateNames[index] - - portdirection += turns - } - return { rotatename, portdirection } } @@ -301,13 +289,18 @@ export function getPins (portOrientation, v1) { return pins } -export function getPointXY (rotationParameters) { +export function getPointXY (rotationParameters, blockname) { let pointX let pointY switch (rotationParameters.rotatename) { case 'ExplicitInputPort': - pointX = -portSize - pointY = -portSize / 2 + if (blockname === 'Ground') { + pointX = -portSize / 2 + pointY = -portSize + } else { + pointX = -portSize + pointY = -portSize / 2 + } break case 'ControlPort': pointX = -portSize / 2 @@ -366,8 +359,6 @@ export function getSuperBlockDiagram (xml) { function parseXmlToGraph (xmlDoc, graph) { const parent = graph.getDefaultParent() let v1 - let blockrotation - let firstportrotation const model = graph.getModel() model.beginUpdate() @@ -379,6 +370,7 @@ function parseXmlToGraph (xmlDoc, graph) { let cellslength = cells.length let remainingcells = [] let portCount + let blockname try { console.log('cellslength1=', cellslength) while (cellslength > 0 && cellslength !== oldcellslength) { @@ -398,18 +390,17 @@ function parseXmlToGraph (xmlDoc, graph) { } const style = cellAttrs.style.value const styleObject = styleToObject(style) - if (styleObject.rotation === undefined) { - blockrotation = 0 - } else { - blockrotation = parseInt(styleObject.rotation) - } - firstportrotation = null + const stylename = styleObject.default + blockname = stylename const vertexId = cellAttrs.id.value const geom = cellChildren[0].attributes const xPos = (geom.x !== undefined) ? Number(geom.x.value) : 0 const yPos = (geom.y !== undefined) ? Number(geom.y.value) : 0 const height = Number(geom.height.value) const width = Number(geom.width.value) + if (DEBUG_PORT && stylename === 'TEXT_f') { + continue + } v1 = graph.insertVertex(parent, vertexId, null, xPos, yPos, width, height, style) v1.connectable = 0 v1.CellType = 'Component' @@ -479,44 +470,20 @@ function parseXmlToGraph (xmlDoc, graph) { const style = cellAttrs.style.value const styleObject = styleToObject(style) const stylename = styleObject.default - let portrotation - - if (styleObject.rotation === undefined) { - portrotation = 0 - } else { - portrotation = parseInt(styleObject.rotation) - } - - let rotation = portrotation - blockrotation - if (stylename === 'ControlPort' || stylename === 'CommandPort') { - rotation -= 90 - } - if (rotation < 0) { - rotation += 360 - } - if (firstportrotation === null) { - firstportrotation = rotation - } else if (rotation !== firstportrotation) { - rotation = firstportrotation - } const vertexId = cellAttrs.id.value const geom = cellChildren[0].attributes - let xPos = (geom.x !== undefined) ? Number(geom.x.value) : 0 - let yPos = (geom.y !== undefined) ? Number(geom.y.value) : 0 + const xPos = (geom.x !== undefined) ? Number(geom.x.value) : 0 + const yPos = (geom.y !== undefined) ? Number(geom.y.value) : 0 - const rotationParameters = getRotationParameters(stylename, rotation) + const rotationParameters = getRotationParameters(stylename) const pins = getPins(stylename, v1) - const pointXY = getPointXY(rotationParameters) + const pointXY = getPointXY(rotationParameters, blockname) const pointX = pointXY.pointX const pointY = pointXY.pointY - const xyPos = getXYPos(rotationParameters, xPos, yPos) - xPos = xyPos.xPos - yPos = xyPos.yPos - const point = new mxPoint(pointX, pointY) const vp = graph.insertVertex(v1, vertexId, null, xPos, yPos, portSize, portSize, style) @@ -545,6 +512,9 @@ function parseXmlToGraph (xmlDoc, graph) { pins.push(vp) } } else if (cellAttrs.edge) { // is edge + if (DEBUG_PORT) { + continue + } const edgeId = cellAttrs.id.value const source = cellAttrs.sourceVertex.value diff --git a/blocks/eda-frontend/src/static/gallery/gallery0.png b/blocks/eda-frontend/src/static/gallery/gallery0.png Binary files differindex 5168e89d..7fbccd56 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery0.png +++ b/blocks/eda-frontend/src/static/gallery/gallery0.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery1.png b/blocks/eda-frontend/src/static/gallery/gallery1.png Binary files differindex 547c92bf..13e58e06 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery1.png +++ b/blocks/eda-frontend/src/static/gallery/gallery1.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery10.png b/blocks/eda-frontend/src/static/gallery/gallery10.png Binary files differindex c67a70f4..a60902d5 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery10.png +++ b/blocks/eda-frontend/src/static/gallery/gallery10.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery11.png b/blocks/eda-frontend/src/static/gallery/gallery11.png Binary files differindex 0eb16b04..663ed601 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery11.png +++ b/blocks/eda-frontend/src/static/gallery/gallery11.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery113.png b/blocks/eda-frontend/src/static/gallery/gallery113.png Binary files differindex 17d60700..9c5e1d99 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery113.png +++ b/blocks/eda-frontend/src/static/gallery/gallery113.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery114.png b/blocks/eda-frontend/src/static/gallery/gallery114.png Binary files differindex 4bcaf562..ccc55a38 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery114.png +++ b/blocks/eda-frontend/src/static/gallery/gallery114.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery119.png b/blocks/eda-frontend/src/static/gallery/gallery119.png Binary files differindex cb29d436..154db6a7 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery119.png +++ b/blocks/eda-frontend/src/static/gallery/gallery119.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery12.png b/blocks/eda-frontend/src/static/gallery/gallery12.png Binary files differindex 86df4012..8c3b083a 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery12.png +++ b/blocks/eda-frontend/src/static/gallery/gallery12.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery123.png b/blocks/eda-frontend/src/static/gallery/gallery123.png Binary files differindex c02aa057..4cf5de1e 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery123.png +++ b/blocks/eda-frontend/src/static/gallery/gallery123.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery124.png b/blocks/eda-frontend/src/static/gallery/gallery124.png Binary files differindex 7e19c7a9..332bab5a 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery124.png +++ b/blocks/eda-frontend/src/static/gallery/gallery124.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery126.png b/blocks/eda-frontend/src/static/gallery/gallery126.png Binary files differindex b83d9a35..4eff24d9 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery126.png +++ b/blocks/eda-frontend/src/static/gallery/gallery126.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery127.png b/blocks/eda-frontend/src/static/gallery/gallery127.png Binary files differindex 618c05bd..abadbcf1 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery127.png +++ b/blocks/eda-frontend/src/static/gallery/gallery127.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery128.png b/blocks/eda-frontend/src/static/gallery/gallery128.png Binary files differindex 238c7c9f..4444efb2 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery128.png +++ b/blocks/eda-frontend/src/static/gallery/gallery128.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery135.png b/blocks/eda-frontend/src/static/gallery/gallery135.png Binary files differindex c635265b..e91b5f3d 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery135.png +++ b/blocks/eda-frontend/src/static/gallery/gallery135.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery14.png b/blocks/eda-frontend/src/static/gallery/gallery14.png Binary files differindex 7780ef24..eae5c5dd 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery14.png +++ b/blocks/eda-frontend/src/static/gallery/gallery14.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery144.png b/blocks/eda-frontend/src/static/gallery/gallery144.png Binary files differindex 3c1e839e..3f71bd0e 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery144.png +++ b/blocks/eda-frontend/src/static/gallery/gallery144.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery149.png b/blocks/eda-frontend/src/static/gallery/gallery149.png Binary files differindex be9c72e7..edcaa57b 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery149.png +++ b/blocks/eda-frontend/src/static/gallery/gallery149.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery15.png b/blocks/eda-frontend/src/static/gallery/gallery15.png Binary files differindex 193dd4bd..80d72008 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery15.png +++ b/blocks/eda-frontend/src/static/gallery/gallery15.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery152.png b/blocks/eda-frontend/src/static/gallery/gallery152.png Binary files differindex e8f67784..3e5708e2 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery152.png +++ b/blocks/eda-frontend/src/static/gallery/gallery152.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery153.png b/blocks/eda-frontend/src/static/gallery/gallery153.png Binary files differindex e67ac464..fb2735bf 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery153.png +++ b/blocks/eda-frontend/src/static/gallery/gallery153.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery154.png b/blocks/eda-frontend/src/static/gallery/gallery154.png Binary files differindex 851606c9..555380ab 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery154.png +++ b/blocks/eda-frontend/src/static/gallery/gallery154.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery16.png b/blocks/eda-frontend/src/static/gallery/gallery16.png Binary files differindex 6d8bc841..c9fc1834 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery16.png +++ b/blocks/eda-frontend/src/static/gallery/gallery16.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery2.png b/blocks/eda-frontend/src/static/gallery/gallery2.png Binary files differindex 70d7c736..76a411c7 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery2.png +++ b/blocks/eda-frontend/src/static/gallery/gallery2.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery21.png b/blocks/eda-frontend/src/static/gallery/gallery21.png Binary files differindex 16968afd..e7b7f6f4 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery21.png +++ b/blocks/eda-frontend/src/static/gallery/gallery21.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery22.png b/blocks/eda-frontend/src/static/gallery/gallery22.png Binary files differindex cf5d2052..9b81be49 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery22.png +++ b/blocks/eda-frontend/src/static/gallery/gallery22.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery23.png b/blocks/eda-frontend/src/static/gallery/gallery23.png Binary files differindex 16968afd..e7b7f6f4 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery23.png +++ b/blocks/eda-frontend/src/static/gallery/gallery23.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery24.png b/blocks/eda-frontend/src/static/gallery/gallery24.png Binary files differindex 27853edc..09a06740 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery24.png +++ b/blocks/eda-frontend/src/static/gallery/gallery24.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery25.png b/blocks/eda-frontend/src/static/gallery/gallery25.png Binary files differindex 16968afd..e7b7f6f4 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery25.png +++ b/blocks/eda-frontend/src/static/gallery/gallery25.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery26.png b/blocks/eda-frontend/src/static/gallery/gallery26.png Binary files differindex 14eb7cbc..d083f470 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery26.png +++ b/blocks/eda-frontend/src/static/gallery/gallery26.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery27.png b/blocks/eda-frontend/src/static/gallery/gallery27.png Binary files differindex be04f346..c02a4e05 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery27.png +++ b/blocks/eda-frontend/src/static/gallery/gallery27.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery28.png b/blocks/eda-frontend/src/static/gallery/gallery28.png Binary files differindex aeceb1cd..4593cef1 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery28.png +++ b/blocks/eda-frontend/src/static/gallery/gallery28.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery29.png b/blocks/eda-frontend/src/static/gallery/gallery29.png Binary files differindex 00d96c9b..d2d3b38d 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery29.png +++ b/blocks/eda-frontend/src/static/gallery/gallery29.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery30.png b/blocks/eda-frontend/src/static/gallery/gallery30.png Binary files differindex 00d96c9b..d2d3b38d 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery30.png +++ b/blocks/eda-frontend/src/static/gallery/gallery30.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery31.png b/blocks/eda-frontend/src/static/gallery/gallery31.png Binary files differindex bca178bd..9dadeac3 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery31.png +++ b/blocks/eda-frontend/src/static/gallery/gallery31.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery32.png b/blocks/eda-frontend/src/static/gallery/gallery32.png Binary files differindex 859bda3f..ca83126a 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery32.png +++ b/blocks/eda-frontend/src/static/gallery/gallery32.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery33.png b/blocks/eda-frontend/src/static/gallery/gallery33.png Binary files differindex 6c6ee788..4125d3b9 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery33.png +++ b/blocks/eda-frontend/src/static/gallery/gallery33.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery34.png b/blocks/eda-frontend/src/static/gallery/gallery34.png Binary files differindex 667a4457..81dedd90 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery34.png +++ b/blocks/eda-frontend/src/static/gallery/gallery34.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery35.png b/blocks/eda-frontend/src/static/gallery/gallery35.png Binary files differindex 475bda4b..a10d24ff 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery35.png +++ b/blocks/eda-frontend/src/static/gallery/gallery35.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery36.png b/blocks/eda-frontend/src/static/gallery/gallery36.png Binary files differindex 475bda4b..a10d24ff 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery36.png +++ b/blocks/eda-frontend/src/static/gallery/gallery36.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery37.png b/blocks/eda-frontend/src/static/gallery/gallery37.png Binary files differindex f95484fd..8c2a5515 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery37.png +++ b/blocks/eda-frontend/src/static/gallery/gallery37.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery38.png b/blocks/eda-frontend/src/static/gallery/gallery38.png Binary files differindex f95484fd..8c2a5515 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery38.png +++ b/blocks/eda-frontend/src/static/gallery/gallery38.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery39.png b/blocks/eda-frontend/src/static/gallery/gallery39.png Binary files differindex 380819ca..57aac69b 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery39.png +++ b/blocks/eda-frontend/src/static/gallery/gallery39.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery4.png b/blocks/eda-frontend/src/static/gallery/gallery4.png Binary files differindex e2ac4b15..0e73c3e0 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery4.png +++ b/blocks/eda-frontend/src/static/gallery/gallery4.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery40.png b/blocks/eda-frontend/src/static/gallery/gallery40.png Binary files differindex 380819ca..57aac69b 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery40.png +++ b/blocks/eda-frontend/src/static/gallery/gallery40.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery41.png b/blocks/eda-frontend/src/static/gallery/gallery41.png Binary files differindex df8bfa04..61ffbe68 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery41.png +++ b/blocks/eda-frontend/src/static/gallery/gallery41.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery43.png b/blocks/eda-frontend/src/static/gallery/gallery43.png Binary files differindex 826ed34e..d395e041 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery43.png +++ b/blocks/eda-frontend/src/static/gallery/gallery43.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery5.png b/blocks/eda-frontend/src/static/gallery/gallery5.png Binary files differindex c3d5a9c0..e5f641aa 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery5.png +++ b/blocks/eda-frontend/src/static/gallery/gallery5.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery6.png b/blocks/eda-frontend/src/static/gallery/gallery6.png Binary files differindex f03337a1..ef1979aa 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery6.png +++ b/blocks/eda-frontend/src/static/gallery/gallery6.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery64.png b/blocks/eda-frontend/src/static/gallery/gallery64.png Binary files differindex e52898d0..913d4eca 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery64.png +++ b/blocks/eda-frontend/src/static/gallery/gallery64.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery65.png b/blocks/eda-frontend/src/static/gallery/gallery65.png Binary files differindex 1b4d8a5f..7013a53d 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery65.png +++ b/blocks/eda-frontend/src/static/gallery/gallery65.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery67.png b/blocks/eda-frontend/src/static/gallery/gallery67.png Binary files differindex 08e3fc5c..99704e4e 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery67.png +++ b/blocks/eda-frontend/src/static/gallery/gallery67.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery68.png b/blocks/eda-frontend/src/static/gallery/gallery68.png Binary files differindex 86f613c8..ab485db5 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery68.png +++ b/blocks/eda-frontend/src/static/gallery/gallery68.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery69.png b/blocks/eda-frontend/src/static/gallery/gallery69.png Binary files differindex 097550ec..826b0032 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery69.png +++ b/blocks/eda-frontend/src/static/gallery/gallery69.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery7.png b/blocks/eda-frontend/src/static/gallery/gallery7.png Binary files differindex 137d8168..b8aec100 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery7.png +++ b/blocks/eda-frontend/src/static/gallery/gallery7.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery71.png b/blocks/eda-frontend/src/static/gallery/gallery71.png Binary files differindex 40a2f027..310d813e 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery71.png +++ b/blocks/eda-frontend/src/static/gallery/gallery71.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery72.png b/blocks/eda-frontend/src/static/gallery/gallery72.png Binary files differindex 2e479ecd..d053b63b 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery72.png +++ b/blocks/eda-frontend/src/static/gallery/gallery72.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery73.png b/blocks/eda-frontend/src/static/gallery/gallery73.png Binary files differindex f210df6f..5fb308ab 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery73.png +++ b/blocks/eda-frontend/src/static/gallery/gallery73.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery74.png b/blocks/eda-frontend/src/static/gallery/gallery74.png Binary files differindex 64569fdb..a46059f6 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery74.png +++ b/blocks/eda-frontend/src/static/gallery/gallery74.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery75.png b/blocks/eda-frontend/src/static/gallery/gallery75.png Binary files differindex 5d4ee99f..3ae4238b 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery75.png +++ b/blocks/eda-frontend/src/static/gallery/gallery75.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery79.png b/blocks/eda-frontend/src/static/gallery/gallery79.png Binary files differindex 9b6c6298..9ee6297f 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery79.png +++ b/blocks/eda-frontend/src/static/gallery/gallery79.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery84.png b/blocks/eda-frontend/src/static/gallery/gallery84.png Binary files differindex 12269ecf..9111d1cc 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery84.png +++ b/blocks/eda-frontend/src/static/gallery/gallery84.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery85.png b/blocks/eda-frontend/src/static/gallery/gallery85.png Binary files differindex a045ee9e..824f8ee5 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery85.png +++ b/blocks/eda-frontend/src/static/gallery/gallery85.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery86.png b/blocks/eda-frontend/src/static/gallery/gallery86.png Binary files differindex 37e9e444..36367031 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery86.png +++ b/blocks/eda-frontend/src/static/gallery/gallery86.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery87.png b/blocks/eda-frontend/src/static/gallery/gallery87.png Binary files differindex a8a82096..43352b49 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery87.png +++ b/blocks/eda-frontend/src/static/gallery/gallery87.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery88.png b/blocks/eda-frontend/src/static/gallery/gallery88.png Binary files differindex b87cb84d..16306e28 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery88.png +++ b/blocks/eda-frontend/src/static/gallery/gallery88.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery9.png b/blocks/eda-frontend/src/static/gallery/gallery9.png Binary files differindex d5fbbc2f..0e8b09de 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery9.png +++ b/blocks/eda-frontend/src/static/gallery/gallery9.png diff --git a/blocks/update_media.py b/blocks/update_media.py index 1500c4f7..176e1ef4 100644 --- a/blocks/update_media.py +++ b/blocks/update_media.py @@ -43,7 +43,8 @@ def join_and_copy_images(db_path, statesave_table, gallery_table): sql = f""" SELECT s.base64_image, g.media FROM {statesave_table} AS s - JOIN {gallery_table} AS g ON s.description = g.description; + JOIN {gallery_table} AS g ON s.description = g.description + ORDER BY g.id; """ # Execute the query to fetch the data diff --git a/blocks/xcos2xml/blocks/Ground.xsl b/blocks/xcos2xml/blocks/Ground.xsl index 1ec7b909..27caa0cd 100644 --- a/blocks/xcos2xml/blocks/Ground.xsl +++ b/blocks/xcos2xml/blocks/Ground.xsl @@ -63,5 +63,6 @@ <xsl:with-param name="implicitOutputPorts" select="$implicitOutputPorts" /> <xsl:with-param name="controlPorts" select="$controlPorts" /> <xsl:with-param name="commandPorts" select="$commandPorts" /> + <xsl:with-param name="blockname" select="@interfaceFunctionName" /> </xsl:call-template> </xsl:template> diff --git a/blocks/xcos2xml/ports/port.xsl b/blocks/xcos2xml/ports/port.xsl index 7d2d8bf7..39b246c7 100644 --- a/blocks/xcos2xml/ports/port.xsl +++ b/blocks/xcos2xml/ports/port.xsl @@ -14,6 +14,8 @@ <xsl:param name="implicitOutputPorts" /> <xsl:param name="controlPorts" /> <xsl:param name="commandPorts" /> + <xsl:param name="blockname" select="''"/> <!-- Optional with default --> + <xsl:for-each select="key('k-in', $id)"> <xsl:element name="mxCell"> <xsl:attribute name="style"> @@ -36,14 +38,30 @@ <xsl:attribute name="tary">0</xsl:attribute> <mxGeometry> <xsl:variable name="numerator" select="2 * @ordering - 1" /> - <xsl:attribute name="y"> - <xsl:value-of select="$numerator div (2 * number($explicitInputPorts + $implicitInputPorts))" /> - </xsl:attribute> - <xsl:attribute name="width">8</xsl:attribute> - <xsl:attribute name="height">8</xsl:attribute> - <xsl:attribute name="relative">1</xsl:attribute> - <xsl:attribute name="as">geometry</xsl:attribute> - <mxPoint x="-8" y="-4" as="offset" /> + <xsl:choose> + <xsl:when test="$blockname = 'Ground'"> + <xsl:attribute name="x"> + <xsl:value-of select="$numerator div (2 * number($explicitInputPorts + $implicitInputPorts))" /> + </xsl:attribute> + <xsl:attribute name="y">0</xsl:attribute> + <xsl:attribute name="width">8</xsl:attribute> + <xsl:attribute name="height">8</xsl:attribute> + <xsl:attribute name="relative">1</xsl:attribute> + <xsl:attribute name="as">geometry</xsl:attribute> + <mxPoint x="-4" y="-8" as="offset" /> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="x">0</xsl:attribute> + <xsl:attribute name="y"> + <xsl:value-of select="$numerator div (2 * number($explicitInputPorts + $implicitInputPorts))" /> + </xsl:attribute> + <xsl:attribute name="width">8</xsl:attribute> + <xsl:attribute name="height">8</xsl:attribute> + <xsl:attribute name="relative">1</xsl:attribute> + <xsl:attribute name="as">geometry</xsl:attribute> + <mxPoint x="-8" y="-4" as="offset" /> + </xsl:otherwise> + </xsl:choose> </mxGeometry> <Object as="parameter_values" /> <Object as="displayProperties" /> @@ -146,6 +164,7 @@ <xsl:attribute name="x"> <xsl:value-of select="$numerator div (2 * number($controlPorts))" /> </xsl:attribute> + <xsl:attribute name="y">0</xsl:attribute> <xsl:attribute name="width">8</xsl:attribute> <xsl:attribute name="height">8</xsl:attribute> <xsl:attribute name="relative">1</xsl:attribute> |