Merge remote-tracking branch 'origin/rtViz' into simulation

This commit is contained in:
2025-04-09 18:38:08 +05:30
36 changed files with 919 additions and 434 deletions

View File

@@ -4,6 +4,7 @@ import { AddIcon, ArrowIcon, FocusIcon } from "../../icons/ExportCommonIcons";
import KebabMenuListMultiSelect from "./KebebMenuListMultiSelect";
import { useFloorItems, useZones } from "../../../store/store";
import { useSelectedZoneStore } from "../../../store/useZoneStore";
import { getZone2dData } from "../../../services/realTimeVisulization/zoneData/getZoneData";
interface DropDownListProps {
value?: string; // Value to display in the DropDownList
@@ -55,7 +56,7 @@ const DropDownList: React.FC<DropDownListProps> = ({
assets: { id: string; name: string; position?: []; rotation?: {} }[];
}
const [zoneDataList, setZoneDataList] = useState<ZoneData[]>([]);
const { floorItems, setFloorItems } = useFloorItems();
const { floorItems } = useFloorItems();
const isPointInsidePolygon = (point: [number, number], polygon: [number, number][]) => {
let inside = false;
@@ -72,8 +73,7 @@ const DropDownList: React.FC<DropDownListProps> = ({
};
useEffect(() => {
const updatedZoneList: ZoneData[] = zones.map((zone: Zone) => {
const updatedZoneList: ZoneData[] = zones?.map((zone: Zone) => {
const polygon2D = zone.points.map((p: [number, number, number]) => [p[0], p[2]]) as [number, number][];
const assetsInZone = floorItems