fixed widget size

This commit is contained in:
Nalvazhuthi 2025-04-10 10:06:53 +05:30
parent c953c71f3f
commit 5f0f5034de
3 changed files with 5 additions and 2 deletions

View File

@ -94,6 +94,7 @@ export const DraggableWidget = ({
"floating", "floating",
"sidebar-right-wrapper", "sidebar-right-wrapper",
"card", "card",
"dropdown-menu",
], ],
setMenuVisible: () => setSelectedChartId(null), setMenuVisible: () => setSelectedChartId(null),
}); });

View File

@ -49,6 +49,7 @@ const DroppedObjects: React.FC = () => {
const { visualizationSocket } = useSocketStore(); const { visualizationSocket } = useSocketStore();
const { isPlaying } = usePlayButtonStore(); const { isPlaying } = usePlayButtonStore();
const zones = useDroppedObjectsStore((state) => state.zones); const zones = useDroppedObjectsStore((state) => state.zones);
console.log('zones: ', zones);
const [openKebabId, setOpenKebabId] = useState<string | null>(null); const [openKebabId, setOpenKebabId] = useState<string | null>(null);
const updateObjectPosition = useDroppedObjectsStore( const updateObjectPosition = useDroppedObjectsStore(
(state) => state.updateObjectPosition (state) => state.updateObjectPosition
@ -70,6 +71,7 @@ const DroppedObjects: React.FC = () => {
vertical: "top" | "bottom"; vertical: "top" | "bottom";
horizontal: "left" | "right"; horizontal: "left" | "right";
} | null>(null); // State to track active edges for distance lines } | null>(null); // State to track active edges for distance lines
const [currentPosition, setCurrentPosition] = useState<{ const [currentPosition, setCurrentPosition] = useState<{
top: number | "auto"; top: number | "auto";
left: number | "auto"; left: number | "auto";

View File

@ -164,8 +164,8 @@ const Panel: React.FC<PanelProps> = ({
// Calculate panel capacity // Calculate panel capacity
const calculatePanelCapacity = (panel: Side) => { const calculatePanelCapacity = (panel: Side) => {
const CHART_WIDTH = panelSize; const CHART_WIDTH = panelSize - 10;
const CHART_HEIGHT = panelSize; const CHART_HEIGHT = panelSize - 10;
const dimensions = panelDimensions[panel]; const dimensions = panelDimensions[panel];
if (!dimensions) { if (!dimensions) {