summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2025-06-17 10:53:13 +0530
committerSunil Shetye2025-06-18 20:51:40 +0530
commit9c8d1e15b1cb94970c20c27246e1ee10ad3b2ee3 (patch)
treeae747f1ad57bfc02a76af9db89ac8877ec5581f0
parent76532f2eb53338469cf74f7abf5217d67def60fa (diff)
downloadCommon-Interface-Project-9c8d1e15b1cb94970c20c27246e1ee10ad3b2ee3.tar.gz
Common-Interface-Project-9c8d1e15b1cb94970c20c27246e1ee10ad3b2ee3.tar.bz2
Common-Interface-Project-9c8d1e15b1cb94970c20c27246e1ee10ad3b2ee3.zip
ignore port rotation when calculating its position
-rw-r--r--blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js78
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery0.pngbin43526 -> 43437 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery1.pngbin60810 -> 60897 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery10.pngbin56135 -> 56202 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery11.pngbin47476 -> 48036 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery113.pngbin38405 -> 38362 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery114.pngbin50482 -> 49966 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery119.pngbin35867 -> 36016 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery12.pngbin39910 -> 40033 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery123.pngbin40681 -> 40517 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery124.pngbin40375 -> 39861 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery126.pngbin40348 -> 40730 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery127.pngbin43133 -> 42605 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery128.pngbin41633 -> 40608 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery135.pngbin39417 -> 39171 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery14.pngbin30775 -> 30818 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery144.pngbin54988 -> 54871 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery149.pngbin176733 -> 176738 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery15.pngbin30207 -> 30272 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery152.pngbin47963 -> 47646 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery153.pngbin55707 -> 55496 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery154.pngbin41312 -> 40783 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery16.pngbin31696 -> 31713 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery2.pngbin46498 -> 46717 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery21.pngbin44364 -> 43008 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery22.pngbin48069 -> 45803 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery23.pngbin44364 -> 43008 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery24.pngbin41731 -> 40740 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery25.pngbin44364 -> 43008 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery26.pngbin41066 -> 39276 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery27.pngbin41145 -> 40713 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery28.pngbin45503 -> 44074 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery29.pngbin47385 -> 46223 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery30.pngbin47385 -> 46223 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery31.pngbin34490 -> 34472 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery32.pngbin45320 -> 43991 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery33.pngbin53618 -> 51055 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery34.pngbin46488 -> 44765 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery35.pngbin42410 -> 42145 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery36.pngbin42410 -> 42145 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery37.pngbin41743 -> 40653 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery38.pngbin41743 -> 40653 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery39.pngbin44356 -> 43039 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery4.pngbin48392 -> 48495 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery40.pngbin44356 -> 43039 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery41.pngbin41299 -> 40735 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery43.pngbin54148 -> 54139 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery5.pngbin76901 -> 76925 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery6.pngbin32321 -> 32419 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery64.pngbin39246 -> 39860 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery65.pngbin47213 -> 47245 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery67.pngbin36001 -> 36174 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery68.pngbin51176 -> 51255 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery69.pngbin43211 -> 43350 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery7.pngbin34203 -> 34277 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery71.pngbin40062 -> 39836 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery72.pngbin49404 -> 49320 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery73.pngbin36754 -> 36845 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery74.pngbin30635 -> 30772 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery75.pngbin43361 -> 43410 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery79.pngbin43000 -> 43122 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery84.pngbin44789 -> 45012 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery85.pngbin43162 -> 42818 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery86.pngbin39572 -> 39676 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery87.pngbin44325 -> 44503 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery88.pngbin59887 -> 60122 bytes
-rw-r--r--blocks/eda-frontend/src/static/gallery/gallery9.pngbin39026 -> 39084 bytes
-rw-r--r--blocks/update_media.py3
-rw-r--r--blocks/xcos2xml/blocks/Ground.xsl1
-rw-r--r--blocks/xcos2xml/ports/port.xsl35
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
index 5168e89d..7fbccd56 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery0.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery0.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery1.png b/blocks/eda-frontend/src/static/gallery/gallery1.png
index 547c92bf..13e58e06 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery1.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery1.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery10.png b/blocks/eda-frontend/src/static/gallery/gallery10.png
index c67a70f4..a60902d5 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery10.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery10.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery11.png b/blocks/eda-frontend/src/static/gallery/gallery11.png
index 0eb16b04..663ed601 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery11.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery11.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery113.png b/blocks/eda-frontend/src/static/gallery/gallery113.png
index 17d60700..9c5e1d99 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery113.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery113.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery114.png b/blocks/eda-frontend/src/static/gallery/gallery114.png
index 4bcaf562..ccc55a38 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery114.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery114.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery119.png b/blocks/eda-frontend/src/static/gallery/gallery119.png
index cb29d436..154db6a7 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery119.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery119.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery12.png b/blocks/eda-frontend/src/static/gallery/gallery12.png
index 86df4012..8c3b083a 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery12.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery12.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery123.png b/blocks/eda-frontend/src/static/gallery/gallery123.png
index c02aa057..4cf5de1e 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery123.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery123.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery124.png b/blocks/eda-frontend/src/static/gallery/gallery124.png
index 7e19c7a9..332bab5a 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery124.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery124.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery126.png b/blocks/eda-frontend/src/static/gallery/gallery126.png
index b83d9a35..4eff24d9 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery126.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery126.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery127.png b/blocks/eda-frontend/src/static/gallery/gallery127.png
index 618c05bd..abadbcf1 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery127.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery127.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery128.png b/blocks/eda-frontend/src/static/gallery/gallery128.png
index 238c7c9f..4444efb2 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery128.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery128.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery135.png b/blocks/eda-frontend/src/static/gallery/gallery135.png
index c635265b..e91b5f3d 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery135.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery135.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery14.png b/blocks/eda-frontend/src/static/gallery/gallery14.png
index 7780ef24..eae5c5dd 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery14.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery14.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery144.png b/blocks/eda-frontend/src/static/gallery/gallery144.png
index 3c1e839e..3f71bd0e 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery144.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery144.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery149.png b/blocks/eda-frontend/src/static/gallery/gallery149.png
index be9c72e7..edcaa57b 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery149.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery149.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery15.png b/blocks/eda-frontend/src/static/gallery/gallery15.png
index 193dd4bd..80d72008 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery15.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery15.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery152.png b/blocks/eda-frontend/src/static/gallery/gallery152.png
index e8f67784..3e5708e2 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery152.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery152.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery153.png b/blocks/eda-frontend/src/static/gallery/gallery153.png
index e67ac464..fb2735bf 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery153.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery153.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery154.png b/blocks/eda-frontend/src/static/gallery/gallery154.png
index 851606c9..555380ab 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery154.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery154.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery16.png b/blocks/eda-frontend/src/static/gallery/gallery16.png
index 6d8bc841..c9fc1834 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery16.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery16.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery2.png b/blocks/eda-frontend/src/static/gallery/gallery2.png
index 70d7c736..76a411c7 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery2.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery2.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery21.png b/blocks/eda-frontend/src/static/gallery/gallery21.png
index 16968afd..e7b7f6f4 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery21.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery21.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery22.png b/blocks/eda-frontend/src/static/gallery/gallery22.png
index cf5d2052..9b81be49 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery22.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery22.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery23.png b/blocks/eda-frontend/src/static/gallery/gallery23.png
index 16968afd..e7b7f6f4 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery23.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery23.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery24.png b/blocks/eda-frontend/src/static/gallery/gallery24.png
index 27853edc..09a06740 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery24.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery24.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery25.png b/blocks/eda-frontend/src/static/gallery/gallery25.png
index 16968afd..e7b7f6f4 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery25.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery25.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery26.png b/blocks/eda-frontend/src/static/gallery/gallery26.png
index 14eb7cbc..d083f470 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery26.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery26.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery27.png b/blocks/eda-frontend/src/static/gallery/gallery27.png
index be04f346..c02a4e05 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery27.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery27.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery28.png b/blocks/eda-frontend/src/static/gallery/gallery28.png
index aeceb1cd..4593cef1 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery28.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery28.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery29.png b/blocks/eda-frontend/src/static/gallery/gallery29.png
index 00d96c9b..d2d3b38d 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery29.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery29.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery30.png b/blocks/eda-frontend/src/static/gallery/gallery30.png
index 00d96c9b..d2d3b38d 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery30.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery30.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery31.png b/blocks/eda-frontend/src/static/gallery/gallery31.png
index bca178bd..9dadeac3 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery31.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery31.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery32.png b/blocks/eda-frontend/src/static/gallery/gallery32.png
index 859bda3f..ca83126a 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery32.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery32.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery33.png b/blocks/eda-frontend/src/static/gallery/gallery33.png
index 6c6ee788..4125d3b9 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery33.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery33.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery34.png b/blocks/eda-frontend/src/static/gallery/gallery34.png
index 667a4457..81dedd90 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery34.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery34.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery35.png b/blocks/eda-frontend/src/static/gallery/gallery35.png
index 475bda4b..a10d24ff 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery35.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery35.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery36.png b/blocks/eda-frontend/src/static/gallery/gallery36.png
index 475bda4b..a10d24ff 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery36.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery36.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery37.png b/blocks/eda-frontend/src/static/gallery/gallery37.png
index f95484fd..8c2a5515 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery37.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery37.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery38.png b/blocks/eda-frontend/src/static/gallery/gallery38.png
index f95484fd..8c2a5515 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery38.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery38.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery39.png b/blocks/eda-frontend/src/static/gallery/gallery39.png
index 380819ca..57aac69b 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery39.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery39.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery4.png b/blocks/eda-frontend/src/static/gallery/gallery4.png
index e2ac4b15..0e73c3e0 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery4.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery4.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery40.png b/blocks/eda-frontend/src/static/gallery/gallery40.png
index 380819ca..57aac69b 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery40.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery40.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery41.png b/blocks/eda-frontend/src/static/gallery/gallery41.png
index df8bfa04..61ffbe68 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery41.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery41.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery43.png b/blocks/eda-frontend/src/static/gallery/gallery43.png
index 826ed34e..d395e041 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery43.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery43.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery5.png b/blocks/eda-frontend/src/static/gallery/gallery5.png
index c3d5a9c0..e5f641aa 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery5.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery5.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery6.png b/blocks/eda-frontend/src/static/gallery/gallery6.png
index f03337a1..ef1979aa 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery6.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery6.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery64.png b/blocks/eda-frontend/src/static/gallery/gallery64.png
index e52898d0..913d4eca 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery64.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery64.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery65.png b/blocks/eda-frontend/src/static/gallery/gallery65.png
index 1b4d8a5f..7013a53d 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery65.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery65.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery67.png b/blocks/eda-frontend/src/static/gallery/gallery67.png
index 08e3fc5c..99704e4e 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery67.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery67.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery68.png b/blocks/eda-frontend/src/static/gallery/gallery68.png
index 86f613c8..ab485db5 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery68.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery68.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery69.png b/blocks/eda-frontend/src/static/gallery/gallery69.png
index 097550ec..826b0032 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery69.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery69.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery7.png b/blocks/eda-frontend/src/static/gallery/gallery7.png
index 137d8168..b8aec100 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery7.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery7.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery71.png b/blocks/eda-frontend/src/static/gallery/gallery71.png
index 40a2f027..310d813e 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery71.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery71.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery72.png b/blocks/eda-frontend/src/static/gallery/gallery72.png
index 2e479ecd..d053b63b 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery72.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery72.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery73.png b/blocks/eda-frontend/src/static/gallery/gallery73.png
index f210df6f..5fb308ab 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery73.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery73.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery74.png b/blocks/eda-frontend/src/static/gallery/gallery74.png
index 64569fdb..a46059f6 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery74.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery74.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery75.png b/blocks/eda-frontend/src/static/gallery/gallery75.png
index 5d4ee99f..3ae4238b 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery75.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery75.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery79.png b/blocks/eda-frontend/src/static/gallery/gallery79.png
index 9b6c6298..9ee6297f 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery79.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery79.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery84.png b/blocks/eda-frontend/src/static/gallery/gallery84.png
index 12269ecf..9111d1cc 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery84.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery84.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery85.png b/blocks/eda-frontend/src/static/gallery/gallery85.png
index a045ee9e..824f8ee5 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery85.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery85.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery86.png b/blocks/eda-frontend/src/static/gallery/gallery86.png
index 37e9e444..36367031 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery86.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery86.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery87.png b/blocks/eda-frontend/src/static/gallery/gallery87.png
index a8a82096..43352b49 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery87.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery87.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery88.png b/blocks/eda-frontend/src/static/gallery/gallery88.png
index b87cb84d..16306e28 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery88.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery88.png
Binary files differ
diff --git a/blocks/eda-frontend/src/static/gallery/gallery9.png b/blocks/eda-frontend/src/static/gallery/gallery9.png
index d5fbbc2f..0e8b09de 100644
--- a/blocks/eda-frontend/src/static/gallery/gallery9.png
+++ b/blocks/eda-frontend/src/static/gallery/gallery9.png
Binary files differ
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>