From 23aa2c2fbfd6b82e0995e64c9b1ecdb90bd62de1 Mon Sep 17 00:00:00 2001 From: smfahim25 Date: Sun, 2 Feb 2025 17:26:55 +0600 Subject: [PATCH] solved position issue --- src/App.jsx | 13 +++++++++---- src/components/Canvas/Canvas.jsx | 7 +++---- src/components/Layouts/LeftSidebar.jsx | 2 +- src/components/Panel/TopBar.jsx | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index a2b196e..a8c57dd 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -93,14 +93,19 @@ function App() { // // // - -
+
{selectedPanel !== "" && } -
+
+ {" "} + {/* Changed */} {activeObject && } - +
+ {" "} + {/* Added wrapper */} + +
diff --git a/src/components/Canvas/Canvas.jsx b/src/components/Canvas/Canvas.jsx index 9eef731..77ccedf 100644 --- a/src/components/Canvas/Canvas.jsx +++ b/src/components/Canvas/Canvas.jsx @@ -26,7 +26,7 @@ export default function Canvas() { setScreenWidth, } = useContext(CanvasContext); - const { activeObject, setActiveObject } = useContext(ActiveObjectContext); + const { setActiveObject } = useContext(ActiveObjectContext); const [zoomLevel, setZoomLevel] = useState(100); const containerRef = useRef(null); @@ -270,9 +270,8 @@ export default function Canvas() {
+
{sidebarItems.map((item) => { const Icon = item.icon; return ( diff --git a/src/components/Panel/TopBar.jsx b/src/components/Panel/TopBar.jsx index 383c396..6fc382b 100644 --- a/src/components/Panel/TopBar.jsx +++ b/src/components/Panel/TopBar.jsx @@ -27,7 +27,7 @@ export function TopBar() {