summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuchita Lad2025-07-16 12:34:46 +0530
committerSuchita Lad2025-07-16 12:34:46 +0530
commit2f0b4defead36d2e8e7449d4ec788b0457594b48 (patch)
treef11f6f1ed513ed1217cbcc62cb24ad51c2747636
parent1a02da8b8a81b88a6f0f56e5900fa85cc6dda198 (diff)
downloadCommon-Interface-Project-2f0b4defead36d2e8e7449d4ec788b0457594b48.tar.gz
Common-Interface-Project-2f0b4defead36d2e8e7449d4ec788b0457594b48.tar.bz2
Common-Interface-Project-2f0b4defead36d2e8e7449d4ec788b0457594b48.zip
Change flip and mirror icon
-rw-r--r--blocks/eda-frontend/src/components/SchematicEditor/SchematicToolbar.js3
-rw-r--r--blocks/eda-frontend/src/utils/GalleryUtils.js6
2 files changed, 3 insertions, 6 deletions
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/SchematicToolbar.js b/blocks/eda-frontend/src/components/SchematicEditor/SchematicToolbar.js
index 38b1f0f0..b91b43bd 100644
--- a/blocks/eda-frontend/src/components/SchematicEditor/SchematicToolbar.js
+++ b/blocks/eda-frontend/src/components/SchematicEditor/SchematicToolbar.js
@@ -22,7 +22,6 @@ import {
} from '@material-ui/core'
import { makeStyles } from '@material-ui/core/styles'
import AddBoxOutlinedIcon from '@material-ui/icons/AddBoxOutlined'
-import ArrowDownwardIcon from '@material-ui/icons/ArrowDownward'
import ClearAllIcon from '@material-ui/icons/ClearAll'
import CloseIcon from '@material-ui/icons/Close'
import CompareArrowsIcon from '@material-ui/icons/CompareArrows'
@@ -518,7 +517,7 @@ export default function SchematicToolbar ({ _mobileClose, gridRef }) {
{ icon: <RedoIcon fontSize='small' />, label: 'Redo', action: editorRedo },
'pipe',
{ icon: <RotateRightIcon fontSize='small' />, label: 'Rotate', action: Rotate },
- { icon: <ArrowDownwardIcon fontSize='small' />, label: 'Flip', action: Flip },
+ { icon: <CompareArrowsIcon style={{ transform: 'rotate(90deg)' }} fontSize='small' />, label: 'Flip', action: Flip },
{ icon: <CompareArrowsIcon fontSize='small' />, label: 'Mirror', action: Mirror },
'pipe',
{ icon: <ZoomInIcon fontSize='small' />, label: 'Zoom In', action: editorZoomIn },
diff --git a/blocks/eda-frontend/src/utils/GalleryUtils.js b/blocks/eda-frontend/src/utils/GalleryUtils.js
index 767f4f05..37322592 100644
--- a/blocks/eda-frontend/src/utils/GalleryUtils.js
+++ b/blocks/eda-frontend/src/utils/GalleryUtils.js
@@ -179,12 +179,10 @@ export const styleToObject = (style) => {
export const objectToStyle = (styleObject) => {
let style = styleObject.default
for (const [key, value] of Object.entries(styleObject)) {
- if (key === 'default') {
+ if (key === 'default' || value == null || value === '') {
continue
}
- if (value !== undefined && value !== null && value !== '') {
- style += `;${key}=${value}`
- }
+ style += `;${key}=${value}`
}
return style
}