feat(workbench): align v2 GIS and SCADA API
Generic Container CI/CD / test-build-publish (push) Successful in 26s
Frontend CI/CD / build-test-publish-and-deploy (push) Successful in 26s

This commit is contained in:
2026-09-08 18:18:40 +08:00
parent 28287a1447
commit f9c71cc076
45 changed files with 1025 additions and 254 deletions
@@ -1,4 +1,6 @@
import type { FeatureCollection, Point } from "geojson";
import type { Map as MapLibreMap } from "maplibre-gl";
import type { ScadaDevice } from "../api/scada-client";
import { useEffect, useRef, useSyncExternalStore, type RefObject } from "react";
import { getResponsiveWorkbenchPadding } from "../map/camera";
import { WorkbenchMapController } from "../map/workbench-map-controller";
@@ -9,7 +11,8 @@ export function useWorkbenchMapController({
leftPanelOpen,
rightPanelOpen,
conditionPanelExpanded = false,
agentPanelWidth
agentPanelWidth,
getScadaFeatures
}: {
mapRef: RefObject<MapLibreMap | null>;
mapReady: boolean;
@@ -17,6 +20,7 @@ export function useWorkbenchMapController({
rightPanelOpen: boolean;
conditionPanelExpanded?: boolean;
agentPanelWidth?: number;
getScadaFeatures?: (deviceIds?: string[], signal?: AbortSignal) => Promise<FeatureCollection<Point, ScadaDevice>>;
}) {
const valuesRef = useRef({
mapReady,
@@ -48,7 +52,8 @@ export function useWorkbenchMapController({
valuesRef.current.agentPanelWidth
)
: { top: 48, right: 48, bottom: 48, left: 48 };
}
},
getScadaFeatures
});
}