summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2025-04-29 16:38:26 +0530
committerSunil Shetye2025-04-29 16:38:26 +0530
commitb3259919003110d56e82031aafbb7809ff0a57e9 (patch)
tree69f55d284a9a025955f68a4bd6dbade549b83e46
parent16df3fabc762f1d6fa499e3f3e45377ef176c5f1 (diff)
downloadCommon-Interface-Project-b3259919003110d56e82031aafbb7809ff0a57e9.tar.gz
Common-Interface-Project-b3259919003110d56e82031aafbb7809ff0a57e9.tar.bz2
Common-Interface-Project-b3259919003110d56e82031aafbb7809ff0a57e9.zip
set id also in componentProperties
-rw-r--r--blocks/eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js20
-rw-r--r--blocks/eda-frontend/src/redux/componentPropertiesSlice.js2
2 files changed, 12 insertions, 10 deletions
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js b/blocks/eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js
index dd3d513b..f274d8df 100644
--- a/blocks/eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js
+++ b/blocks/eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js
@@ -158,7 +158,7 @@ export default function LoadGrid (container, sidebar, outline) {
graph.setEnterStopsCellEditing(true)
// Adds rubberband selection
- new mxRubberband(graph) // eslint-disable-line no-new
+ new mxRubberband(graph)
// Alternative solution for implementing connection points without child cells.
// This can be extended as shown in portrefs.html example to allow for per-port
@@ -255,17 +255,17 @@ export default function LoadGrid (container, sidebar, outline) {
const styleObject = styleToObject(source.style)
let style = 'Link'
switch (styleObject.default) {
- case 'ExplicitOutputPort': case 'ExplicitInputPort':
- style = 'ExplicitLink'
- break
+ case 'ExplicitOutputPort': case 'ExplicitInputPort':
+ style = 'ExplicitLink'
+ break
- case 'ImplicitOutputPort': case 'ImplicitInputPort':
- style = 'ImplicitLink'
- break
+ case 'ImplicitOutputPort': case 'ImplicitInputPort':
+ style = 'ImplicitLink'
+ break
- case 'CommandPort': case 'ControlPort':
- style = 'CommandControlLink'
- break
+ case 'CommandPort': case 'ControlPort':
+ style = 'CommandControlLink'
+ break
}
text = style + '\n' +
'UID: ' + cell.id + '\n' +
diff --git a/blocks/eda-frontend/src/redux/componentPropertiesSlice.js b/blocks/eda-frontend/src/redux/componentPropertiesSlice.js
index 4c0781d7..89c1c4a2 100644
--- a/blocks/eda-frontend/src/redux/componentPropertiesSlice.js
+++ b/blocks/eda-frontend/src/redux/componentPropertiesSlice.js
@@ -6,6 +6,7 @@ import { styleToObject } from '../utils/GalleryUtils'
const initialState = {
block: null,
name: '',
+ id: '',
parameter_values: {},
errorFields: {},
isPropertiesWindowOpen: false,
@@ -78,6 +79,7 @@ const componentPropertiesSlice = createSlice({
const block = action.meta.arg
state.block = block
state.name = styleToObject(block.style).default
+ state.id = block.id
state.parameter_values = block.parameter_values
state.errorFields = block.errorFields
state.displayProperties = block.displayProperties