@fleet-frontend/mower-maps 0.2.0-beta.22 → 0.2.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -19899,7 +19899,7 @@ const useCreateVisionOffElement = () => {
|
|
|
19899
19899
|
const centerPoint = useMemo(() => {
|
|
19900
19900
|
if (!svgViewBox)
|
|
19901
19901
|
return null;
|
|
19902
|
-
const center = [svgViewBox.x + svgViewBox.width / 2, svgViewBox.y
|
|
19902
|
+
const center = [svgViewBox.x + svgViewBox.width / 2, -svgViewBox.y - svgViewBox.height / 2];
|
|
19903
19903
|
return center;
|
|
19904
19904
|
}, [svgViewBox]);
|
|
19905
19905
|
const elementWidth = useMemo(() => {
|
|
@@ -20905,11 +20905,15 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
20905
20905
|
});
|
|
20906
20906
|
MowerMapRenderer.displayName = 'MowerMapRenderer';
|
|
20907
20907
|
|
|
20908
|
-
const BoundarySvgRender = React__default.memo(({ mapJson, id, maxWidth = 300 }) => {
|
|
20908
|
+
const BoundarySvgRender = React__default.memo(({ mapJson, unStructMapData, id, maxWidth = 300 }) => {
|
|
20909
20909
|
const svgElementData = useMemo(() => {
|
|
20910
|
+
if (unStructMapData) {
|
|
20911
|
+
const data = UnifiedMapDataProcessor.processUnstructMapData(unStructMapData, DEFAULT_STYLES) || {};
|
|
20912
|
+
return data;
|
|
20913
|
+
}
|
|
20910
20914
|
const data = UnifiedMapDataProcessor.processMapData(mapJson, DEFAULT_STYLES) || {};
|
|
20911
20915
|
return data;
|
|
20912
|
-
}, [mapJson, DEFAULT_STYLES]);
|
|
20916
|
+
}, [mapJson, unStructMapData, DEFAULT_STYLES]);
|
|
20913
20917
|
const boundaryInfo = useMemo(() => {
|
|
20914
20918
|
const boundary = svgElementData.boundary.find((item) => item.id === id);
|
|
20915
20919
|
return boundary;
|
package/dist/index.js
CHANGED
|
@@ -19919,7 +19919,7 @@ const useCreateVisionOffElement = () => {
|
|
|
19919
19919
|
const centerPoint = React.useMemo(() => {
|
|
19920
19920
|
if (!svgViewBox)
|
|
19921
19921
|
return null;
|
|
19922
|
-
const center = [svgViewBox.x + svgViewBox.width / 2, svgViewBox.y
|
|
19922
|
+
const center = [svgViewBox.x + svgViewBox.width / 2, -svgViewBox.y - svgViewBox.height / 2];
|
|
19923
19923
|
return center;
|
|
19924
19924
|
}, [svgViewBox]);
|
|
19925
19925
|
const elementWidth = React.useMemo(() => {
|
|
@@ -20925,11 +20925,15 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
20925
20925
|
});
|
|
20926
20926
|
MowerMapRenderer.displayName = 'MowerMapRenderer';
|
|
20927
20927
|
|
|
20928
|
-
const BoundarySvgRender = React.memo(({ mapJson, id, maxWidth = 300 }) => {
|
|
20928
|
+
const BoundarySvgRender = React.memo(({ mapJson, unStructMapData, id, maxWidth = 300 }) => {
|
|
20929
20929
|
const svgElementData = React.useMemo(() => {
|
|
20930
|
+
if (unStructMapData) {
|
|
20931
|
+
const data = UnifiedMapDataProcessor.processUnstructMapData(unStructMapData, DEFAULT_STYLES) || {};
|
|
20932
|
+
return data;
|
|
20933
|
+
}
|
|
20930
20934
|
const data = UnifiedMapDataProcessor.processMapData(mapJson, DEFAULT_STYLES) || {};
|
|
20931
20935
|
return data;
|
|
20932
|
-
}, [mapJson, DEFAULT_STYLES]);
|
|
20936
|
+
}, [mapJson, unStructMapData, DEFAULT_STYLES]);
|
|
20933
20937
|
const boundaryInfo = React.useMemo(() => {
|
|
20934
20938
|
const boundary = svgElementData.boundary.find((item) => item.id === id);
|
|
20935
20939
|
return boundary;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { MapData } from '../types';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { UnstructMapData } from '../types';
|
|
3
4
|
interface BoundarySvgRenderProps {
|
|
4
5
|
mapJson: MapData;
|
|
6
|
+
unStructMapData: UnstructMapData;
|
|
5
7
|
id: number;
|
|
6
8
|
maxWidth?: number;
|
|
7
9
|
}
|
|
8
|
-
declare const BoundarySvgRender: React.MemoExoticComponent<({ mapJson, id, maxWidth }: BoundarySvgRenderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
10
|
+
declare const BoundarySvgRender: React.MemoExoticComponent<({ mapJson, unStructMapData, id, maxWidth }: BoundarySvgRenderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
11
|
export default BoundarySvgRender;
|
|
10
12
|
//# sourceMappingURL=BoundarySvgRender.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoundarySvgRender.d.ts","sourceRoot":"","sources":["../../src/render/BoundarySvgRender.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKnC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BoundarySvgRender.d.ts","sourceRoot":"","sources":["../../src/render/BoundarySvgRender.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,sBAAsB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,iBAAiB,yEAC8B,sBAAsB,6CAuG1E,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|