From 9903d6351ac0277d066a8d348ba82e5ab96a7318 Mon Sep 17 00:00:00 2001 From: Nalvazhuthi Date: Wed, 9 Apr 2025 09:42:49 +0530 Subject: [PATCH] fixed display zones dispay cetner --- app/src/components/ui/componets/DraggableWidget.tsx | 3 +++ .../components/ui/componets/DroppedFloatingWidgets.tsx | 1 - app/src/components/ui/componets/Panel.tsx | 6 ++++-- app/src/styles/pages/realTimeViz.scss | 8 ++++---- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/src/components/ui/componets/DraggableWidget.tsx b/app/src/components/ui/componets/DraggableWidget.tsx index cfd002d..e37ce30 100644 --- a/app/src/components/ui/componets/DraggableWidget.tsx +++ b/app/src/components/ui/componets/DraggableWidget.tsx @@ -398,3 +398,6 @@ export const DraggableWidget = ({ }; + + +// by using canvasDimensions.height canvasDimensions.width dynamically div value insted of static 6 and 4 calculate according to canvasDimensions.width canvasDimensions.height \ No newline at end of file diff --git a/app/src/components/ui/componets/DroppedFloatingWidgets.tsx b/app/src/components/ui/componets/DroppedFloatingWidgets.tsx index bd707f4..9c0b8da 100644 --- a/app/src/components/ui/componets/DroppedFloatingWidgets.tsx +++ b/app/src/components/ui/componets/DroppedFloatingWidgets.tsx @@ -510,7 +510,6 @@ const DroppedObjects: React.FC = () => { const widthMultiplier = parseFloat(containerWidth) * 0.13; - console.log("zone.objects: ", zone.objects); return (
= ({ // Calculate capacities and dimensions const topWidth = getPanelStyle("top").width; - const bottomWidth = getPanelStyle("bottom").width; + const bottomWidth = getPanelStyle("bottom").height; const leftHeight = getPanelStyle("left").height; const rightHeight = getPanelStyle("right").height; @@ -255,13 +255,15 @@ const Panel: React.FC = ({ const leftCapacity = calculatePanelCapacity("left"); const rightCapacity = calculatePanelCapacity("right"); + console.log('topCapacity: ', topCapacity); + console.log('bottomWidth: ', bottomWidth); return ( <>