@fleet-frontend/mower-maps 0.2.0-beta.43 → 0.2.0-beta.45
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 +25 -39
- package/dist/index.js +25 -39
- package/dist/render/MowerMapRenderer.d.ts.map +1 -1
- package/dist/render/boundaryLabels/index.d.ts.map +1 -1
- package/dist/render/boundaryLabels/useBoundaryLabels.d.ts.map +1 -1
- package/dist/render/svgElement/ChannelElement/index.d.ts.map +1 -1
- package/dist/render/svgElement/MowGateElement/index.d.ts.map +1 -1
- package/dist/render/svgElement/PathElement/index.d.ts.map +1 -1
- package/dist/render/svgElement/index.d.ts.map +1 -1
- package/dist/utils/boundaryUtils.d.ts.map +1 -1
- package/dist/utils/mapBounds.d.ts +1 -1
- package/dist/utils/mapBounds.d.ts.map +1 -1
- package/dist/utils/math.d.ts +4 -0
- package/dist/utils/math.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -15417,7 +15417,7 @@ function createPathSegmentsByType(list) {
|
|
|
15417
15417
|
/**
|
|
15418
15418
|
* 计算地图边界
|
|
15419
15419
|
*/
|
|
15420
|
-
function calculateMapBounds(mapData) {
|
|
15420
|
+
function calculateMapBounds(mapData, ignoreVisionOffAreas = false) {
|
|
15421
15421
|
let minX = Infinity;
|
|
15422
15422
|
let minY = Infinity;
|
|
15423
15423
|
let maxX = -Infinity;
|
|
@@ -15447,7 +15447,7 @@ function calculateMapBounds(mapData) {
|
|
|
15447
15447
|
allElements.push(...mapData.tunnels);
|
|
15448
15448
|
if (mapData.time_limit_obstacles)
|
|
15449
15449
|
allElements.push(...mapData.time_limit_obstacles);
|
|
15450
|
-
if (mapData.vision_off_areas)
|
|
15450
|
+
if (!ignoreVisionOffAreas && mapData.vision_off_areas)
|
|
15451
15451
|
allElements.push(...mapData.vision_off_areas);
|
|
15452
15452
|
// 计算元素边界
|
|
15453
15453
|
for (const element of allElements) {
|
|
@@ -15840,6 +15840,9 @@ function generateBoundaryData(mapData, pathData) {
|
|
|
15840
15840
|
continue;
|
|
15841
15841
|
// 每个sub_map的elements是边界坐标,没有sub_map只有一个boundary数据
|
|
15842
15842
|
const boundaryElement = subMap.elements.find((element) => element.type === ElementTypeEnum.BOUNDARY);
|
|
15843
|
+
// 可能存在sub_map中只存在充电桩,没有子地块的情况
|
|
15844
|
+
if (!boundaryElement)
|
|
15845
|
+
continue;
|
|
15843
15846
|
// 如果当前subMap存在充电桩且充电桩存在tunnel,说明当前subMap中的boundary是初始boundary,这个boundary不为孤立区域
|
|
15844
15847
|
const hasTunnelToChargingPile = subMap.elements.some((element) => element.type === ElementTypeEnum.CHARGING_PILE && element.tunnel);
|
|
15845
15848
|
// 创建基础的 boundary 数据(来自 mapData)
|
|
@@ -22461,7 +22464,7 @@ const CommonContextProvider = CommonContext.Provider;
|
|
|
22461
22464
|
const useCommonContext = () => useContext(CommonContext);
|
|
22462
22465
|
|
|
22463
22466
|
const ChannelClipPath = React__default.memo(() => {
|
|
22464
|
-
const { svgViewBox } = useCommonContext();
|
|
22467
|
+
const { svgViewBox, sn } = useCommonContext();
|
|
22465
22468
|
const { svgElementDatas } = useSvgEditContext();
|
|
22466
22469
|
const boundaryData = svgElementDatas?.[DataType.BOUNDARY] || [];
|
|
22467
22470
|
const [minX, minY, maxX, maxY] = useMemo(() => {
|
|
@@ -22638,7 +22641,7 @@ const ChannelClipPath = React__default.memo(() => {
|
|
|
22638
22641
|
});
|
|
22639
22642
|
return baseD;
|
|
22640
22643
|
}, [boundaryData, minX, minY, maxX, maxY]);
|
|
22641
|
-
return (jsx("defs", { children: jsx("clipPath", { id:
|
|
22644
|
+
return (jsx("defs", { children: jsx("clipPath", { id: `channel-clip-path-${sn}`, fillRule: "evenodd", children: jsx("path", { d: d }) }) }));
|
|
22642
22645
|
});
|
|
22643
22646
|
|
|
22644
22647
|
/**
|
|
@@ -24239,7 +24242,7 @@ const PolygonElement = ({ canSelect = false, points, fillColor = 'rgba(0, 0, 0,
|
|
|
24239
24242
|
}
|
|
24240
24243
|
}
|
|
24241
24244
|
},
|
|
24242
|
-
}) }), tooltipIndex === idx && (jsxs("g", { transform: `translate(${coord[0] + 4 * overlayScale * 2}, ${coord[1] - 4 * overlayScale * 2}) scale(${overlayScale * 2})`, onClick: (e) => {
|
|
24245
|
+
}) }), tooltipIndex === idx && coordinates.length > 3 && (jsxs("g", { transform: `translate(${coord[0] + 4 * overlayScale * 2}, ${coord[1] - 4 * overlayScale * 2}) scale(${overlayScale * 2})`, onClick: (e) => {
|
|
24243
24246
|
e.preventDefault();
|
|
24244
24247
|
e.stopPropagation();
|
|
24245
24248
|
if (onVertexDelete &&
|
|
@@ -24342,6 +24345,7 @@ const BoundaryElement = ({ data }) => {
|
|
|
24342
24345
|
};
|
|
24343
24346
|
|
|
24344
24347
|
const ChannelElement = ({ data }) => {
|
|
24348
|
+
const { sn } = useCommonContext();
|
|
24345
24349
|
const points = data.points;
|
|
24346
24350
|
const style = data.style;
|
|
24347
24351
|
let pathData = `M ${points[0][0]} ${points[0][1]}`;
|
|
@@ -24351,7 +24355,7 @@ const ChannelElement = ({ data }) => {
|
|
|
24351
24355
|
const topLineWidth = dp2px(style.lineWidth).toString();
|
|
24352
24356
|
const bottomLineWidth = dp2px(style.bottomLineWidth).toString();
|
|
24353
24357
|
const dashLength = dp2px(style.lineWidth);
|
|
24354
|
-
return (jsxs("g", { id: data.id.toString(), children: [jsx("path", { d: pathData, fill: "none", stroke: "#8498A9", strokeWidth: bottomLineWidth, strokeLinejoin: "round", opacity: style.opacity || 1, style: { clipPath:
|
|
24358
|
+
return (jsxs("g", { id: data.id.toString(), children: [jsx("path", { d: pathData, fill: "none", stroke: "#8498A9", strokeWidth: bottomLineWidth, strokeLinejoin: "round", opacity: style.opacity || 1, style: { clipPath: `url(#channel-clip-path-${sn})` } }), jsx("path", { d: pathData, fill: "none", stroke: "#FFFFFF", strokeWidth: topLineWidth, strokeLinejoin: "round", strokeDasharray: `${dashLength * 2} ${dashLength}`, opacity: style.opacity || 1, style: { clipPath: `url(#channel-clip-path-${sn})` } })] }));
|
|
24355
24359
|
};
|
|
24356
24360
|
|
|
24357
24361
|
/**
|
|
@@ -26231,34 +26235,17 @@ const DoodleElement = ({ data }) => {
|
|
|
26231
26235
|
};
|
|
26232
26236
|
|
|
26233
26237
|
const MowGateElement = ({ data }) => {
|
|
26234
|
-
const
|
|
26235
|
-
|
|
26236
|
-
|
|
26237
|
-
|
|
26238
|
-
|
|
26239
|
-
|
|
26240
|
-
return;
|
|
26241
|
-
const originalWidth = parseFloat(svgEl.getAttribute('width') || '20');
|
|
26242
|
-
const originalHeight = parseFloat(svgEl.getAttribute('height') || '20');
|
|
26243
|
-
const direction = data.direction || 0;
|
|
26244
|
-
const transformGroup = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
26245
|
-
const transform = [
|
|
26238
|
+
const rotateDegree = useMemo(() => {
|
|
26239
|
+
const degree = DIRECTION_DEGREE - (data.direction || 0);
|
|
26240
|
+
return degree;
|
|
26241
|
+
}, [data.direction]);
|
|
26242
|
+
const transform = useMemo(() => {
|
|
26243
|
+
return [
|
|
26246
26244
|
`translate(${data.points?.[0][0]}, ${data.points?.[0][1]})`,
|
|
26247
|
-
`rotate(${
|
|
26248
|
-
`translate(${-
|
|
26245
|
+
`rotate(${rotateDegree})`,
|
|
26246
|
+
`translate(${ -11}, ${ -11})`,
|
|
26249
26247
|
].join(' ');
|
|
26250
|
-
|
|
26251
|
-
if (data.style?.opacity !== undefined) {
|
|
26252
|
-
transformGroup.setAttribute('opacity', String(data.style.opacity));
|
|
26253
|
-
}
|
|
26254
|
-
transformGroup.appendChild(svgEl);
|
|
26255
|
-
return transformGroup;
|
|
26256
|
-
}, [svgMarkup, data]);
|
|
26257
|
-
const transform = [
|
|
26258
|
-
`translate(${data.points?.[0][0]}, ${data.points?.[0][1]})`,
|
|
26259
|
-
`rotate(${-((data.direction || 0) * 180) / Math.PI})`,
|
|
26260
|
-
`translate(${ -11}, ${ -11})`,
|
|
26261
|
-
].join(' ');
|
|
26248
|
+
}, [data.points, rotateDegree]);
|
|
26262
26249
|
return (jsx("g", { transform: transform, children: jsxs("svg", { width: "22", height: "22", viewBox: "0 0 43 42", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("rect", { x: "1.5", y: "1.5", width: "39", height: "39", rx: "19.5", fill: "#EBEEF1", stroke: "white", "stroke-width": "3" }), jsx("path", { d: "M28.6641 11.918C30.6523 11.918 32.2637 13.5304 32.2637 15.5186V29.002C32.2637 29.5984 31.7801 30.082 31.1836 30.082H10.8164C10.2201 30.0819 9.73633 29.5983 9.73633 29.002V15.5186C9.73633 13.5303 11.3487 11.918 13.3369 11.918H28.6641Z", fill: "url(#paint0_linear_15603_15792)", stroke: "#676E88", "stroke-width": "1.8" }), jsx("rect", { x: "20.4541", y: "12.8184", width: "1.09091", height: "16.3636", fill: "white", "fill-opacity": "0.3" }), jsx("mask", { id: "path-4-inside-1_15603_15792", fill: "white", children: jsx("rect", { x: "16.0909", y: "16.0918", width: "9.81818", height: "9.81818", rx: "0.9" }) }), jsx("rect", { x: "16.0909", y: "16.0918", width: "9.81818", height: "9.81818", rx: "0.9", stroke: "white", "stroke-width": "2.18182", "stroke-dasharray": "2.7 2.7", mask: "url(#path-4-inside-1_15603_15792)" }), jsx("defs", { children: jsxs("linearGradient", { id: "paint0_linear_15603_15792", x1: "20.0292", y1: "10.6652", x2: "23.7032", y2: "28.6292", gradientUnits: "userSpaceOnUse", children: [jsx("stop", { "stop-color": "#8488A2" }), jsx("stop", { offset: "0.649539", "stop-color": "#585B71" }), jsx("stop", { offset: "0.885026", "stop-color": "#444959" })] }) })] }) }));
|
|
26263
26250
|
};
|
|
26264
26251
|
|
|
@@ -26293,7 +26280,6 @@ const SvgElement = React__default.memo(({ type, data, interactive = false }) =>
|
|
|
26293
26280
|
return jsx(ChannelElement, { data: data });
|
|
26294
26281
|
}
|
|
26295
26282
|
else if (type === 'mowGate') {
|
|
26296
|
-
console.log('mow_gate', data);
|
|
26297
26283
|
return jsx(MowGateElement, { data: data });
|
|
26298
26284
|
}
|
|
26299
26285
|
return null;
|
|
@@ -26443,6 +26429,7 @@ function transformSvgPath(pathData, center, scale, direction, originalWidth, ori
|
|
|
26443
26429
|
}
|
|
26444
26430
|
const PathElement = forwardRef(({ mapConfig, pathData, mowPartitionData }, ref) => {
|
|
26445
26431
|
const { svgViewElementDatas = {}, currentMowingPartitionId, processStateIsMowing, } = useSvgEditContext();
|
|
26432
|
+
const { sn } = useCommonContext();
|
|
26446
26433
|
const { pathElementDates, updatePathData, updatePathDataByMowingPosition } = usePathElement({
|
|
26447
26434
|
pathData,
|
|
26448
26435
|
mapConfig,
|
|
@@ -26466,7 +26453,7 @@ const PathElement = forwardRef(({ mapConfig, pathData, mowPartitionData }, ref)
|
|
|
26466
26453
|
boundarys?.forEach((item) => {
|
|
26467
26454
|
const id = item?.id;
|
|
26468
26455
|
const points = item?.points;
|
|
26469
|
-
const clipPathId = `clip-partition-${id}`;
|
|
26456
|
+
const clipPathId = `clip-partition-${sn}-${id}`;
|
|
26470
26457
|
// clipPath的path路径
|
|
26471
26458
|
let d = '';
|
|
26472
26459
|
// 1. 该分区的外圈边界(顺时针)
|
|
@@ -27025,7 +27012,6 @@ const useBoundaryLabels = ({ mapData, pathData, unitType, viewBox, mowPartitionD
|
|
|
27025
27012
|
const coverageText = `Coverage: ${finishedArea.value}/${totalArea.value}`;
|
|
27026
27013
|
const isMowing = mowingIds.includes(boundary.id);
|
|
27027
27014
|
const dateText = formatBoundaryDateText(isMowing ? Date.now() / 1000 : boundary.endTime || 0);
|
|
27028
|
-
// console.log('-------->', boundary);
|
|
27029
27015
|
results.push({
|
|
27030
27016
|
id: boundary.id,
|
|
27031
27017
|
name: boundary.name,
|
|
@@ -27130,6 +27116,7 @@ const BoundaryLabels = React__default.memo(({ editMap, mapData, pathData, unitTy
|
|
|
27130
27116
|
left: `${item.leftPct}%`,
|
|
27131
27117
|
top: `${item.topPct}%`,
|
|
27132
27118
|
pointerEvents: onlyRead ? 'none' : 'auto',
|
|
27119
|
+
zIndex: expandedId === item.id ? 9999 : containerZIndex,
|
|
27133
27120
|
}, onClick: (e) => {
|
|
27134
27121
|
e.stopPropagation();
|
|
27135
27122
|
if (onlyRead)
|
|
@@ -29157,9 +29144,8 @@ modelType, showStraddleBoundaryBorder = true, mapRef, mapJson, pathJson, realTim
|
|
|
29157
29144
|
curMowPartitionData = mowingPartition;
|
|
29158
29145
|
}
|
|
29159
29146
|
const positionData = realTimeData?.find((item) => item?.type === RealTimeDataType.LOCATION);
|
|
29160
|
-
|
|
29161
|
-
|
|
29162
|
-
const currentStatus = statusData?.vehicleState || positionData?.vehicleState;
|
|
29147
|
+
if (positionData) {
|
|
29148
|
+
const currentStatus = positionData?.vehicleState;
|
|
29163
29149
|
if (currentStatus === RobotStatus.WORKING) {
|
|
29164
29150
|
// 兜底收不到割草地块的实时数据,使用状态来兜底
|
|
29165
29151
|
setMowingPartitions(undefined);
|
|
@@ -29360,7 +29346,7 @@ modelType, showStraddleBoundaryBorder = true, mapRef, mapJson, pathJson, realTim
|
|
|
29360
29346
|
// svgEditMapRef?.current?.adjustSvgSize?.(layout);
|
|
29361
29347
|
setOverlayLayout(layout);
|
|
29362
29348
|
}
|
|
29363
|
-
}, map: mapRef, mapPaneName: 'overlayMouseTarget', bounds: bounds, rotate: drag?.rotation, children: [jsx(MapDrag, { map: mapRef, dragCallbacks: dragCallbacks, onBoundaryLabelsCollapse: () => { }, onTransformChange: handleDragMove, isDragMap: dragMap, canRotateMap: canRotateMap }), jsx(MowPartitionContextProvider, { value: mowPartitionValue, children: jsx(SvgMapComponent, { editMap: editMap, ref: svgMapRef, pathData: pathJson, mapConfig: mergedMapConfig, mowPartitionData: mowPartitionData }) }), jsx(MowerPosition, { editMap: editMap, mowerPositionData: mowerPositionData, viewBox: svgViewBox || null, modelType: modelType, hasEdger: edger, mapData: mapJson, mapConfig: mergedMapConfig, realTimeData: realTimeData, onMowingPositionChange: onMowingPositionChange }), jsx(CharginPile, { mapData: mapJson, mapConfig: mergedMapConfig, viewBox: svgViewBox || null, rotation: drag?.rotation }), jsx(BoundaryLabels, { editMap: editMap, mapData: mapJson, onlyRead: onlyRead, pathData: pathJson, unitType: unitType, viewBox: svgViewBox || null, rotation: drag?.rotation, mowPartitionData:
|
|
29349
|
+
}, map: mapRef, mapPaneName: 'overlayMouseTarget', bounds: bounds, rotate: drag?.rotation, children: [jsx(MapDrag, { map: mapRef, dragCallbacks: dragCallbacks, onBoundaryLabelsCollapse: () => { }, onTransformChange: handleDragMove, isDragMap: dragMap, canRotateMap: canRotateMap }), jsx(MowPartitionContextProvider, { value: mowPartitionValue, children: jsx(SvgMapComponent, { editMap: editMap, ref: svgMapRef, pathData: pathJson, mapConfig: mergedMapConfig, mowPartitionData: mowPartitionData }) }), jsx(MowerPosition, { editMap: editMap, mowerPositionData: mowerPositionData, viewBox: svgViewBox || null, modelType: modelType, hasEdger: edger, mapData: mapJson, mapConfig: mergedMapConfig, realTimeData: realTimeData, onMowingPositionChange: onMowingPositionChange }), jsx(CharginPile, { mapData: mapJson, mapConfig: mergedMapConfig, viewBox: svgViewBox || null, rotation: drag?.rotation }), jsx(BoundaryLabels, { editMap: editMap, mapData: mapJson, onlyRead: onlyRead, pathData: pathJson, unitType: unitType, viewBox: svgViewBox || null, rotation: drag?.rotation, mowPartitionData: mowPartitionData, realTimeData: realTimeData }), jsx(Antennas, { editMap: editMap, antennaConfig: antennaConfig || [], layout: overlayLayout || undefined, viewBox: svgViewBox || null, rotation: drag?.rotation, onlyRead: onlyRead }), jsx(SvgEditMap, { editMap: editMap, ref: svgEditMapRef, mapConfig: mergedMapConfig, onEditInfoMapChange: onEditInfoMapChange })] })] }) }) }));
|
|
29364
29350
|
});
|
|
29365
29351
|
MowerMapRenderer.displayName = 'MowerMapRenderer';
|
|
29366
29352
|
|
package/dist/index.js
CHANGED
|
@@ -15437,7 +15437,7 @@ function createPathSegmentsByType(list) {
|
|
|
15437
15437
|
/**
|
|
15438
15438
|
* 计算地图边界
|
|
15439
15439
|
*/
|
|
15440
|
-
function calculateMapBounds(mapData) {
|
|
15440
|
+
function calculateMapBounds(mapData, ignoreVisionOffAreas = false) {
|
|
15441
15441
|
let minX = Infinity;
|
|
15442
15442
|
let minY = Infinity;
|
|
15443
15443
|
let maxX = -Infinity;
|
|
@@ -15467,7 +15467,7 @@ function calculateMapBounds(mapData) {
|
|
|
15467
15467
|
allElements.push(...mapData.tunnels);
|
|
15468
15468
|
if (mapData.time_limit_obstacles)
|
|
15469
15469
|
allElements.push(...mapData.time_limit_obstacles);
|
|
15470
|
-
if (mapData.vision_off_areas)
|
|
15470
|
+
if (!ignoreVisionOffAreas && mapData.vision_off_areas)
|
|
15471
15471
|
allElements.push(...mapData.vision_off_areas);
|
|
15472
15472
|
// 计算元素边界
|
|
15473
15473
|
for (const element of allElements) {
|
|
@@ -15860,6 +15860,9 @@ function generateBoundaryData(mapData, pathData) {
|
|
|
15860
15860
|
continue;
|
|
15861
15861
|
// 每个sub_map的elements是边界坐标,没有sub_map只有一个boundary数据
|
|
15862
15862
|
const boundaryElement = subMap.elements.find((element) => element.type === ElementTypeEnum.BOUNDARY);
|
|
15863
|
+
// 可能存在sub_map中只存在充电桩,没有子地块的情况
|
|
15864
|
+
if (!boundaryElement)
|
|
15865
|
+
continue;
|
|
15863
15866
|
// 如果当前subMap存在充电桩且充电桩存在tunnel,说明当前subMap中的boundary是初始boundary,这个boundary不为孤立区域
|
|
15864
15867
|
const hasTunnelToChargingPile = subMap.elements.some((element) => element.type === ElementTypeEnum.CHARGING_PILE && element.tunnel);
|
|
15865
15868
|
// 创建基础的 boundary 数据(来自 mapData)
|
|
@@ -22481,7 +22484,7 @@ const CommonContextProvider = CommonContext.Provider;
|
|
|
22481
22484
|
const useCommonContext = () => React.useContext(CommonContext);
|
|
22482
22485
|
|
|
22483
22486
|
const ChannelClipPath = React.memo(() => {
|
|
22484
|
-
const { svgViewBox } = useCommonContext();
|
|
22487
|
+
const { svgViewBox, sn } = useCommonContext();
|
|
22485
22488
|
const { svgElementDatas } = useSvgEditContext();
|
|
22486
22489
|
const boundaryData = svgElementDatas?.[exports.DataType.BOUNDARY] || [];
|
|
22487
22490
|
const [minX, minY, maxX, maxY] = React.useMemo(() => {
|
|
@@ -22658,7 +22661,7 @@ const ChannelClipPath = React.memo(() => {
|
|
|
22658
22661
|
});
|
|
22659
22662
|
return baseD;
|
|
22660
22663
|
}, [boundaryData, minX, minY, maxX, maxY]);
|
|
22661
|
-
return (jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id:
|
|
22664
|
+
return (jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: `channel-clip-path-${sn}`, fillRule: "evenodd", children: jsxRuntime.jsx("path", { d: d }) }) }));
|
|
22662
22665
|
});
|
|
22663
22666
|
|
|
22664
22667
|
/**
|
|
@@ -24259,7 +24262,7 @@ const PolygonElement = ({ canSelect = false, points, fillColor = 'rgba(0, 0, 0,
|
|
|
24259
24262
|
}
|
|
24260
24263
|
}
|
|
24261
24264
|
},
|
|
24262
|
-
}) }), tooltipIndex === idx && (jsxRuntime.jsxs("g", { transform: `translate(${coord[0] + 4 * overlayScale * 2}, ${coord[1] - 4 * overlayScale * 2}) scale(${overlayScale * 2})`, onClick: (e) => {
|
|
24265
|
+
}) }), tooltipIndex === idx && coordinates.length > 3 && (jsxRuntime.jsxs("g", { transform: `translate(${coord[0] + 4 * overlayScale * 2}, ${coord[1] - 4 * overlayScale * 2}) scale(${overlayScale * 2})`, onClick: (e) => {
|
|
24263
24266
|
e.preventDefault();
|
|
24264
24267
|
e.stopPropagation();
|
|
24265
24268
|
if (onVertexDelete &&
|
|
@@ -24362,6 +24365,7 @@ const BoundaryElement = ({ data }) => {
|
|
|
24362
24365
|
};
|
|
24363
24366
|
|
|
24364
24367
|
const ChannelElement = ({ data }) => {
|
|
24368
|
+
const { sn } = useCommonContext();
|
|
24365
24369
|
const points = data.points;
|
|
24366
24370
|
const style = data.style;
|
|
24367
24371
|
let pathData = `M ${points[0][0]} ${points[0][1]}`;
|
|
@@ -24371,7 +24375,7 @@ const ChannelElement = ({ data }) => {
|
|
|
24371
24375
|
const topLineWidth = dp2px(style.lineWidth).toString();
|
|
24372
24376
|
const bottomLineWidth = dp2px(style.bottomLineWidth).toString();
|
|
24373
24377
|
const dashLength = dp2px(style.lineWidth);
|
|
24374
|
-
return (jsxRuntime.jsxs("g", { id: data.id.toString(), children: [jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke: "#8498A9", strokeWidth: bottomLineWidth, strokeLinejoin: "round", opacity: style.opacity || 1, style: { clipPath:
|
|
24378
|
+
return (jsxRuntime.jsxs("g", { id: data.id.toString(), children: [jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke: "#8498A9", strokeWidth: bottomLineWidth, strokeLinejoin: "round", opacity: style.opacity || 1, style: { clipPath: `url(#channel-clip-path-${sn})` } }), jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke: "#FFFFFF", strokeWidth: topLineWidth, strokeLinejoin: "round", strokeDasharray: `${dashLength * 2} ${dashLength}`, opacity: style.opacity || 1, style: { clipPath: `url(#channel-clip-path-${sn})` } })] }));
|
|
24375
24379
|
};
|
|
24376
24380
|
|
|
24377
24381
|
/**
|
|
@@ -26251,34 +26255,17 @@ const DoodleElement = ({ data }) => {
|
|
|
26251
26255
|
};
|
|
26252
26256
|
|
|
26253
26257
|
const MowGateElement = ({ data }) => {
|
|
26254
|
-
const
|
|
26255
|
-
|
|
26256
|
-
|
|
26257
|
-
|
|
26258
|
-
|
|
26259
|
-
|
|
26260
|
-
return;
|
|
26261
|
-
const originalWidth = parseFloat(svgEl.getAttribute('width') || '20');
|
|
26262
|
-
const originalHeight = parseFloat(svgEl.getAttribute('height') || '20');
|
|
26263
|
-
const direction = data.direction || 0;
|
|
26264
|
-
const transformGroup = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
26265
|
-
const transform = [
|
|
26258
|
+
const rotateDegree = React.useMemo(() => {
|
|
26259
|
+
const degree = DIRECTION_DEGREE - (data.direction || 0);
|
|
26260
|
+
return degree;
|
|
26261
|
+
}, [data.direction]);
|
|
26262
|
+
const transform = React.useMemo(() => {
|
|
26263
|
+
return [
|
|
26266
26264
|
`translate(${data.points?.[0][0]}, ${data.points?.[0][1]})`,
|
|
26267
|
-
`rotate(${
|
|
26268
|
-
`translate(${-
|
|
26265
|
+
`rotate(${rotateDegree})`,
|
|
26266
|
+
`translate(${ -11}, ${ -11})`,
|
|
26269
26267
|
].join(' ');
|
|
26270
|
-
|
|
26271
|
-
if (data.style?.opacity !== undefined) {
|
|
26272
|
-
transformGroup.setAttribute('opacity', String(data.style.opacity));
|
|
26273
|
-
}
|
|
26274
|
-
transformGroup.appendChild(svgEl);
|
|
26275
|
-
return transformGroup;
|
|
26276
|
-
}, [svgMarkup, data]);
|
|
26277
|
-
const transform = [
|
|
26278
|
-
`translate(${data.points?.[0][0]}, ${data.points?.[0][1]})`,
|
|
26279
|
-
`rotate(${-((data.direction || 0) * 180) / Math.PI})`,
|
|
26280
|
-
`translate(${ -11}, ${ -11})`,
|
|
26281
|
-
].join(' ');
|
|
26268
|
+
}, [data.points, rotateDegree]);
|
|
26282
26269
|
return (jsxRuntime.jsx("g", { transform: transform, children: jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 43 42", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("rect", { x: "1.5", y: "1.5", width: "39", height: "39", rx: "19.5", fill: "#EBEEF1", stroke: "white", "stroke-width": "3" }), jsxRuntime.jsx("path", { d: "M28.6641 11.918C30.6523 11.918 32.2637 13.5304 32.2637 15.5186V29.002C32.2637 29.5984 31.7801 30.082 31.1836 30.082H10.8164C10.2201 30.0819 9.73633 29.5983 9.73633 29.002V15.5186C9.73633 13.5303 11.3487 11.918 13.3369 11.918H28.6641Z", fill: "url(#paint0_linear_15603_15792)", stroke: "#676E88", "stroke-width": "1.8" }), jsxRuntime.jsx("rect", { x: "20.4541", y: "12.8184", width: "1.09091", height: "16.3636", fill: "white", "fill-opacity": "0.3" }), jsxRuntime.jsx("mask", { id: "path-4-inside-1_15603_15792", fill: "white", children: jsxRuntime.jsx("rect", { x: "16.0909", y: "16.0918", width: "9.81818", height: "9.81818", rx: "0.9" }) }), jsxRuntime.jsx("rect", { x: "16.0909", y: "16.0918", width: "9.81818", height: "9.81818", rx: "0.9", stroke: "white", "stroke-width": "2.18182", "stroke-dasharray": "2.7 2.7", mask: "url(#path-4-inside-1_15603_15792)" }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsxs("linearGradient", { id: "paint0_linear_15603_15792", x1: "20.0292", y1: "10.6652", x2: "23.7032", y2: "28.6292", gradientUnits: "userSpaceOnUse", children: [jsxRuntime.jsx("stop", { "stop-color": "#8488A2" }), jsxRuntime.jsx("stop", { offset: "0.649539", "stop-color": "#585B71" }), jsxRuntime.jsx("stop", { offset: "0.885026", "stop-color": "#444959" })] }) })] }) }));
|
|
26283
26270
|
};
|
|
26284
26271
|
|
|
@@ -26313,7 +26300,6 @@ const SvgElement = React.memo(({ type, data, interactive = false }) => {
|
|
|
26313
26300
|
return jsxRuntime.jsx(ChannelElement, { data: data });
|
|
26314
26301
|
}
|
|
26315
26302
|
else if (type === 'mowGate') {
|
|
26316
|
-
console.log('mow_gate', data);
|
|
26317
26303
|
return jsxRuntime.jsx(MowGateElement, { data: data });
|
|
26318
26304
|
}
|
|
26319
26305
|
return null;
|
|
@@ -26463,6 +26449,7 @@ function transformSvgPath(pathData, center, scale, direction, originalWidth, ori
|
|
|
26463
26449
|
}
|
|
26464
26450
|
const PathElement = React.forwardRef(({ mapConfig, pathData, mowPartitionData }, ref) => {
|
|
26465
26451
|
const { svgViewElementDatas = {}, currentMowingPartitionId, processStateIsMowing, } = useSvgEditContext();
|
|
26452
|
+
const { sn } = useCommonContext();
|
|
26466
26453
|
const { pathElementDates, updatePathData, updatePathDataByMowingPosition } = usePathElement({
|
|
26467
26454
|
pathData,
|
|
26468
26455
|
mapConfig,
|
|
@@ -26486,7 +26473,7 @@ const PathElement = React.forwardRef(({ mapConfig, pathData, mowPartitionData },
|
|
|
26486
26473
|
boundarys?.forEach((item) => {
|
|
26487
26474
|
const id = item?.id;
|
|
26488
26475
|
const points = item?.points;
|
|
26489
|
-
const clipPathId = `clip-partition-${id}`;
|
|
26476
|
+
const clipPathId = `clip-partition-${sn}-${id}`;
|
|
26490
26477
|
// clipPath的path路径
|
|
26491
26478
|
let d = '';
|
|
26492
26479
|
// 1. 该分区的外圈边界(顺时针)
|
|
@@ -27045,7 +27032,6 @@ const useBoundaryLabels = ({ mapData, pathData, unitType, viewBox, mowPartitionD
|
|
|
27045
27032
|
const coverageText = `Coverage: ${finishedArea.value}/${totalArea.value}`;
|
|
27046
27033
|
const isMowing = mowingIds.includes(boundary.id);
|
|
27047
27034
|
const dateText = formatBoundaryDateText(isMowing ? Date.now() / 1000 : boundary.endTime || 0);
|
|
27048
|
-
// console.log('-------->', boundary);
|
|
27049
27035
|
results.push({
|
|
27050
27036
|
id: boundary.id,
|
|
27051
27037
|
name: boundary.name,
|
|
@@ -27150,6 +27136,7 @@ const BoundaryLabels = React.memo(({ editMap, mapData, pathData, unitType, langu
|
|
|
27150
27136
|
left: `${item.leftPct}%`,
|
|
27151
27137
|
top: `${item.topPct}%`,
|
|
27152
27138
|
pointerEvents: onlyRead ? 'none' : 'auto',
|
|
27139
|
+
zIndex: expandedId === item.id ? 9999 : containerZIndex,
|
|
27153
27140
|
}, onClick: (e) => {
|
|
27154
27141
|
e.stopPropagation();
|
|
27155
27142
|
if (onlyRead)
|
|
@@ -29177,9 +29164,8 @@ modelType, showStraddleBoundaryBorder = true, mapRef, mapJson, pathJson, realTim
|
|
|
29177
29164
|
curMowPartitionData = mowingPartition;
|
|
29178
29165
|
}
|
|
29179
29166
|
const positionData = realTimeData?.find((item) => item?.type === RealTimeDataType.LOCATION);
|
|
29180
|
-
|
|
29181
|
-
|
|
29182
|
-
const currentStatus = statusData?.vehicleState || positionData?.vehicleState;
|
|
29167
|
+
if (positionData) {
|
|
29168
|
+
const currentStatus = positionData?.vehicleState;
|
|
29183
29169
|
if (currentStatus === RobotStatus.WORKING) {
|
|
29184
29170
|
// 兜底收不到割草地块的实时数据,使用状态来兜底
|
|
29185
29171
|
setMowingPartitions(undefined);
|
|
@@ -29380,7 +29366,7 @@ modelType, showStraddleBoundaryBorder = true, mapRef, mapJson, pathJson, realTim
|
|
|
29380
29366
|
// svgEditMapRef?.current?.adjustSvgSize?.(layout);
|
|
29381
29367
|
setOverlayLayout(layout);
|
|
29382
29368
|
}
|
|
29383
|
-
}, map: mapRef, mapPaneName: 'overlayMouseTarget', bounds: bounds, rotate: drag?.rotation, children: [jsxRuntime.jsx(MapDrag, { map: mapRef, dragCallbacks: dragCallbacks, onBoundaryLabelsCollapse: () => { }, onTransformChange: handleDragMove, isDragMap: dragMap, canRotateMap: canRotateMap }), jsxRuntime.jsx(MowPartitionContextProvider, { value: mowPartitionValue, children: jsxRuntime.jsx(SvgMapComponent, { editMap: editMap, ref: svgMapRef, pathData: pathJson, mapConfig: mergedMapConfig, mowPartitionData: mowPartitionData }) }), jsxRuntime.jsx(MowerPosition, { editMap: editMap, mowerPositionData: mowerPositionData, viewBox: svgViewBox || null, modelType: modelType, hasEdger: edger, mapData: mapJson, mapConfig: mergedMapConfig, realTimeData: realTimeData, onMowingPositionChange: onMowingPositionChange }), jsxRuntime.jsx(CharginPile, { mapData: mapJson, mapConfig: mergedMapConfig, viewBox: svgViewBox || null, rotation: drag?.rotation }), jsxRuntime.jsx(BoundaryLabels, { editMap: editMap, mapData: mapJson, onlyRead: onlyRead, pathData: pathJson, unitType: unitType, viewBox: svgViewBox || null, rotation: drag?.rotation, mowPartitionData:
|
|
29369
|
+
}, map: mapRef, mapPaneName: 'overlayMouseTarget', bounds: bounds, rotate: drag?.rotation, children: [jsxRuntime.jsx(MapDrag, { map: mapRef, dragCallbacks: dragCallbacks, onBoundaryLabelsCollapse: () => { }, onTransformChange: handleDragMove, isDragMap: dragMap, canRotateMap: canRotateMap }), jsxRuntime.jsx(MowPartitionContextProvider, { value: mowPartitionValue, children: jsxRuntime.jsx(SvgMapComponent, { editMap: editMap, ref: svgMapRef, pathData: pathJson, mapConfig: mergedMapConfig, mowPartitionData: mowPartitionData }) }), jsxRuntime.jsx(MowerPosition, { editMap: editMap, mowerPositionData: mowerPositionData, viewBox: svgViewBox || null, modelType: modelType, hasEdger: edger, mapData: mapJson, mapConfig: mergedMapConfig, realTimeData: realTimeData, onMowingPositionChange: onMowingPositionChange }), jsxRuntime.jsx(CharginPile, { mapData: mapJson, mapConfig: mergedMapConfig, viewBox: svgViewBox || null, rotation: drag?.rotation }), jsxRuntime.jsx(BoundaryLabels, { editMap: editMap, mapData: mapJson, onlyRead: onlyRead, pathData: pathJson, unitType: unitType, viewBox: svgViewBox || null, rotation: drag?.rotation, mowPartitionData: mowPartitionData, realTimeData: realTimeData }), jsxRuntime.jsx(Antennas, { editMap: editMap, antennaConfig: antennaConfig || [], layout: overlayLayout || undefined, viewBox: svgViewBox || null, rotation: drag?.rotation, onlyRead: onlyRead }), jsxRuntime.jsx(SvgEditMap, { editMap: editMap, ref: svgEditMapRef, mapConfig: mergedMapConfig, onEditInfoMapChange: onEditInfoMapChange })] })] }) }) }));
|
|
29384
29370
|
});
|
|
29385
29371
|
MowerMapRenderer.displayName = 'MowerMapRenderer';
|
|
29386
29372
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAuBf,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AA0B3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AA8FD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAuBf,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AA0B3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AA8FD,eAAO,MAAM,gBAAgB,mGAitB5B,CAAC;AAIF,eAAe,gBAAgB,CAAC;AAChC,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/boundaryLabels/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,UAAU,mBAAmB;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,cAAc,+IAYf,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/boundaryLabels/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,UAAU,mBAAmB;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,cAAc,+IAYf,mBAAmB,6CA+EvB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBoundaryLabels.d.ts","sourceRoot":"","sources":["../../../src/render/boundaryLabels/useBoundaryLabels.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAmB,YAAY,EAAE,MAAM,SAAS,CAAC;AAExD,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,GAAI,qFAQ/B,wBAAwB;;;
|
|
1
|
+
{"version":3,"file":"useBoundaryLabels.d.ts","sourceRoot":"","sources":["../../../src/render/boundaryLabels/useBoundaryLabels.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAmB,YAAY,EAAE,MAAM,SAAS,CAAC;AAExD,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,GAAI,qFAQ/B,wBAAwB;;;CAuG1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/ChannelElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/ChannelElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,QAAA,MAAM,cAAc,GAAI,UAAU,mBAAmB,4CAqCpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/MowGateElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/MowGateElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAI3D,UAAU,YAAY;IACpB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,QAAA,MAAM,cAAc,GAAI,UAAU,YAAY,4CA8E7C,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/PathElement/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAGR,qBAAqB,EACrB,WAAW,EACZ,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/PathElement/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAGR,qBAAqB,EACrB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAIxB,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,gBAAgB,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACvF,8BAA8B,EAAE,CAAC,QAAQ,EAAE;QACzC,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,YAAY,CAAC,EAAE,WAAW,CAAC;KAC5B,KAAK,IAAI,CAAC;CACZ;AAuED,QAAA,MAAM,WAAW,6GA+OhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/svgElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,UAAU,cAAc;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,CAAC;IACV,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;IAGxD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,0DAAoD,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/svgElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,UAAU,cAAc;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,CAAC;IACV,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;IAGxD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,0DAAoD,eAAe,6CAuCjF,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boundaryUtils.d.ts","sourceRoot":"","sources":["../../src/utils/boundaryUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAmC9C;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"boundaryUtils.d.ts","sourceRoot":"","sources":["../../src/utils/boundaryUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAmC9C;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,EAAE,CAgG1F;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,GAAG,SAAS,EAC9B,UAAU,EAAE,MAAM,GACjB,YAAY,GAAG,IAAI,CAQrB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAGzD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAUlE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,EAAE,CAG3F;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,EAAE,CAG5F"}
|
|
@@ -3,7 +3,7 @@ import { MapData } from '../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* 计算地图边界
|
|
5
5
|
*/
|
|
6
|
-
export declare function calculateMapBounds(mapData: MapData): MapBounds;
|
|
6
|
+
export declare function calculateMapBounds(mapData: MapData, ignoreVisionOffAreas?: boolean): MapBounds;
|
|
7
7
|
/**
|
|
8
8
|
* 计算所有地块围成的边界
|
|
9
9
|
* @param bounds
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapBounds.d.ts","sourceRoot":"","sources":["../../src/utils/mapBounds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAmB,OAAO,EAAE,MAAM,UAAU,CAAC;AAEpD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"mapBounds.d.ts","sourceRoot":"","sources":["../../src/utils/mapBounds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAmB,OAAO,EAAE,MAAM,UAAU,CAAC;AAEpD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,oBAAoB,UAAQ,GAAG,SAAS,CAsD5F;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAgDnE;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAShF;AACD;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAOzE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,KAAK,CAKxD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAKlF;AAiBD;;;;GAIG;AAEH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG;IAC1D,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrB,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtB,GAAG,IAAI,CA4EP;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAoDpF"}
|
package/dist/utils/math.d.ts
CHANGED
package/dist/utils/math.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/utils/math.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/utils/math.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC;;;;;GAKG;AAEH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,UAO1C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,UAE1C;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,GAAE,SAA4B,GACjC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAAE,CAgExF;AAGD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,UAEzC;AAGD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UAEtE;AAGD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UAEtE;AAED,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,WAAU,MAAU,QAE5D,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,WAAU,MAAU,QAE5D,CAAC;AAGF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,UAErC;AAID,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,UAErC;AAGD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,UAEpC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,KAAK,GAAE,OAAc,EACrB,QAAQ,GAAE,MAAU,mBAcrB;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;AAEpC;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,GAAE,SAA4B,GACjC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE,CAwC7E;AAGD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,UAEtD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,iBAE5C;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,IAAI,EAAE,SAAS,EACf,OAAO,GAAE,OAAe,mBAKzB"}
|