@fleet-frontend/mower-maps 0.2.0-beta.13 → 0.2.0-beta.15
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/context/mapEdit.d.ts +1 -1
- package/dist/context/mapEdit.d.ts.map +1 -1
- package/dist/index.esm.js +73 -106
- package/dist/index.js +73 -106
- package/dist/render/MowerMapRenderer.d.ts.map +1 -1
- package/dist/render/svgEditMap/hooks/useCheckElement.d.ts.map +1 -1
- package/dist/render/svgElement/BoundaryElement/index.d.ts.map +1 -1
- package/dist/render/svgElement/DoodleElement/index.d.ts.map +1 -1
- package/dist/render/svgElement/ObstacleElement/index.d.ts.map +1 -1
- package/dist/render/svgElement/PolygonELement/components/DistanceLabels.d.ts +1 -0
- package/dist/render/svgElement/PolygonELement/components/DistanceLabels.d.ts.map +1 -1
- package/dist/render/svgElement/PolygonELement/index.d.ts.map +1 -1
- package/dist/render/svgElement/TransformWrapper/VisionOffTransformWrapper/VisionOffTransformWrapper.d.ts.map +1 -1
- package/dist/render/svgElement/VisionOffElement/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -38,7 +38,7 @@ export interface MapEditValue {
|
|
|
38
38
|
onSaveBoundaryData?: () => Promise<void>;
|
|
39
39
|
onSaveMap?: () => Promise<void>;
|
|
40
40
|
onHandleDeleteElement?: (params: ElementRecordParams) => Promise<void>;
|
|
41
|
-
onSelectElement?: (type: DataType) => void;
|
|
41
|
+
onSelectElement?: (type: DataType, data: any) => void;
|
|
42
42
|
}
|
|
43
43
|
export interface EditMapInfo {
|
|
44
44
|
editMap?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapEdit.d.ts","sourceRoot":"","sources":["../../src/context/mapEdit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAA6B,QAAQ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oint$1 = (point1, point2) => {
|
|
15214
15214
|
return [(point1[0] + point2[0]) / 2, (point1[1] + point2[1]) / 2];
|
|
15215
15215
|
};
|
|
15216
|
-
const DistanceLabels = ({ coordinates, createMode = false, editMode = false, completed = false, showPoints = false, mousePos: _mousePos = null, ghostLastDistance = null, ghostLastMidpoint = null, ghostFirstDistance = null, ghostFirstMidpoint = null, fontSize = 30, }) => {
|
|
15216
|
+
const DistanceLabels = ({ coordinates, createMode = false, editMode = false, completed = false, showPoints = false, mousePos: _mousePos = null, ghostLastDistance = null, ghostLastMidpoint = null, ghostFirstDistance = null, ghostFirstMidpoint = null, fontSize = 30, showFirstDistance = true, }) => {
|
|
15217
15217
|
// 只在显示可操作顶点时显示距离
|
|
15218
15218
|
if (!((createMode && showPoints) || editMode || (createMode && completed)) ||
|
|
15219
|
-
coordinates.length < 2) {
|
|
15219
|
+
coordinates.length < (showFirstDistance ? 1 : 2)) {
|
|
15220
15220
|
return null;
|
|
15221
15221
|
}
|
|
15222
15222
|
return (jsxs(Fragment, { children: [coordinates.map((coord, idx) => {
|
|
@@ -15228,6 +15228,10 @@ const DistanceLabels = ({ coordinates, createMode = false, editMode = false, com
|
|
|
15228
15228
|
}
|
|
15229
15229
|
const midpoint = calculateMidpoint$1(coord, nextCoord);
|
|
15230
15230
|
const distance = calculatePhysicalDistance$1(coord, nextCoord);
|
|
15231
|
+
// 如果当前点和下一个点坐标一致则不现实,处理头尾点一样的问题
|
|
15232
|
+
if (coord[0] === nextCoord[0] && coord[1] === nextCoord[1]) {
|
|
15233
|
+
return null;
|
|
15234
|
+
}
|
|
15231
15235
|
return (jsx(TextElement, { x: midpoint[0], y: midpoint[1], textAnchor: "middle", alignmentBaseline: "middle", fontSize: fontSize, fill: "#fff", style: {
|
|
15232
15236
|
pointerEvents: 'none',
|
|
15233
15237
|
fontWeight: 'bold',
|
|
@@ -15249,7 +15253,7 @@ const DistanceLabels = ({ coordinates, createMode = false, editMode = false, com
|
|
|
15249
15253
|
} }))] }));
|
|
15250
15254
|
};
|
|
15251
15255
|
|
|
15252
|
-
var css_248z$2 = ".index-module_polygonPathG__S-Bpl {\n
|
|
15256
|
+
var css_248z$2 = ".index-module_polygonPathG__S-Bpl {\n cursor: pointer;\n}\n\n.index-module_vertex__-Qb1u {\n cursor: pointer;\n}\n\n.index-module_dragging__xSFdO {\n cursor: grabbing;\n}\n\n.index-module_createVertex__ldz2E {\n cursor: crosshair;\n}\n\n.index-module_addVertex__hrF71 {\n cursor: pointer;\n}\n\n.index-module_polygonPath__PynOn {\n pointer-events: stroke;\n cursor: pointer;\n}\n\n.index-module_notCreate__bFnkV {\n cursor: no-drop;\n}";
|
|
15253
15257
|
var styles$2 = {"polygonPathG":"index-module_polygonPathG__S-Bpl","vertex":"index-module_vertex__-Qb1u","dragging":"index-module_dragging__xSFdO","addVertex":"index-module_addVertex__hrF71","polygonPath":"index-module_polygonPath__PynOn","notCreate":"index-module_notCreate__bFnkV"};
|
|
15254
15258
|
styleInject(css_248z$2);
|
|
15255
15259
|
|
|
@@ -15670,10 +15674,6 @@ const useCheckElement = () => {
|
|
|
15670
15674
|
return false;
|
|
15671
15675
|
// 获取当前正在创建的 obstacle 的点
|
|
15672
15676
|
const currentObstaclePoints = coordinatesToPoints$1(points) || [];
|
|
15673
|
-
if (platform !== PlatformType.H5) {
|
|
15674
|
-
if (currentObstaclePoints.length === 0)
|
|
15675
|
-
return false; // 还没有开始绘制
|
|
15676
|
-
}
|
|
15677
15677
|
// 构建当前 obstacle 的多边形(包括检查点位置)
|
|
15678
15678
|
const currentObstaclePolygon = [...currentObstaclePoints, checkPoint];
|
|
15679
15679
|
// 获取当前边界内的所有元素
|
|
@@ -15835,9 +15835,16 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
15835
15835
|
const { editMapInfo } = useMapEditContext();
|
|
15836
15836
|
const { platform } = useCommonContext();
|
|
15837
15837
|
// delete icon可能被上一个点遮挡,因为delete在右上方,所以手动处理点让点按照顺时针渲染,这样delete icon层级就会高一些
|
|
15838
|
+
// 编辑的场景禁区的点最后一个和第一个相同,会导致一个位置渲染两个点,需要额外处理下
|
|
15838
15839
|
const coordinates = useMemo(() => {
|
|
15839
|
-
|
|
15840
|
-
|
|
15840
|
+
const temp = editMapInfo?.createMode === CreateStatus.CREATING ? points : [...points].reverse();
|
|
15841
|
+
const firstPoint = temp[0] || [];
|
|
15842
|
+
const lastPoint = temp[temp.length - 1] || [];
|
|
15843
|
+
if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1] && editMapInfo?.editMap) {
|
|
15844
|
+
return temp.slice(0, -1);
|
|
15845
|
+
}
|
|
15846
|
+
return temp;
|
|
15847
|
+
}, [points, editMapInfo?.createMode, editMapInfo?.editMap]);
|
|
15841
15848
|
// 计算点到线段的垂足坐标(使用通用工具函数)
|
|
15842
15849
|
const calculatePerpendicularFoot$1 = useCallback((point, lineStart, lineEnd) => {
|
|
15843
15850
|
return calculatePerpendicularFoot(point, lineStart, lineEnd);
|
|
@@ -16350,7 +16357,7 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
16350
16357
|
const prevIndex = (dragState.dragIndex - 1 + coordinates.length) % coordinates.length;
|
|
16351
16358
|
const nextIndex = (dragState.dragIndex + 1) % coordinates.length;
|
|
16352
16359
|
return (jsxs(Fragment, { children: [jsx("line", { x1: coordinates[prevIndex][0], y1: coordinates[prevIndex][1], x2: dragState.originalPosition[0], y2: dragState.originalPosition[1], stroke: strokeColor, strokeWidth: strokeWidth, strokeOpacity: 0.5, strokeDasharray: "5,5", pointerEvents: "none" }), jsx("line", { x1: dragState.originalPosition[0], y1: dragState.originalPosition[1], x2: coordinates[nextIndex][0], y2: coordinates[nextIndex][1], stroke: strokeColor, strokeWidth: strokeWidth, strokeOpacity: 0.5, strokeDasharray: "5,5", pointerEvents: "none" })] }));
|
|
16353
|
-
})()] })), renderCoordinates.length >= 3 && (jsx("polygon", { className:
|
|
16360
|
+
})()] })), renderCoordinates.length >= 3 && (jsx("polygon", { className: editMapInfo?.editMap ? styles$2.polygonPathG : '', points: polygonPoints, fill: fillColor, fillOpacity: fillOpacity, stroke: "none" // 边框透明
|
|
16354
16361
|
, onClick: onPolygonClick })), jsxs("g", { className: styles$2.polygonPathG, children: [renderCoordinates.length >= 2 &&
|
|
16355
16362
|
pathSegments.map((segment, index) => {
|
|
16356
16363
|
if (segment.points.length < 2)
|
|
@@ -16400,7 +16407,7 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
16400
16407
|
setHoverVertex(null);
|
|
16401
16408
|
},
|
|
16402
16409
|
}) }, `edge-${index}`));
|
|
16403
|
-
}), ghostLastPath && (jsx("path", { d: ghostLastPath, stroke: strokeColor, strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", opacity: 0.7, onClick: onPathClick })), ghostFirstPath && renderCoordinates.length >= 2 && (jsx("path", { d: ghostFirstPath, stroke: strokeColor, strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", opacity: 0.7, onClick: onPathClick })), jsx(DragDistanceIndicator, { dragState: dragState, strokeColor: strokeColor, editMode: editMode, createMode: createMode, completed: completed, fontSize: platform === PlatformType.H5 ? 12 * overlayScale : 30 * overlayScale }), jsx(DistanceLabels, { coordinates: renderCoordinates, createMode: createMode, editMode: editMode, completed: completed, showPoints: showPoints, mousePos: mousePos, ghostLastDistance: ghostLastDistance, ghostLastMidpoint: ghostLastMidpoint, ghostFirstDistance: ghostFirstDistance, ghostFirstMidpoint: ghostFirstMidpoint, fontSize: platform === PlatformType.H5 ? 12 * overlayScale : 30 * overlayScale }), hoverVertex && !dragState.isDragging && (jsx(VertexElement, { cx: hoverVertex.position.x, cy: hoverVertex.position.y, stroke: strokeColor, strokeOpacity: 0.6, fill: "white", fillOpacity: 0.8, pointerEvents: "none" })), ((createMode && showPoints) || editMode || (createMode && completed)) &&
|
|
16410
|
+
}), ghostLastPath && (jsx("path", { d: ghostLastPath, stroke: strokeColor, strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", opacity: 0.7, onClick: onPathClick })), ghostFirstPath && renderCoordinates.length >= 2 && (jsx("path", { d: ghostFirstPath, stroke: strokeColor, strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", opacity: 0.7, onClick: onPathClick })), jsx(DragDistanceIndicator, { dragState: dragState, strokeColor: strokeColor, editMode: editMode, createMode: createMode, completed: completed, fontSize: platform === PlatformType.H5 ? 12 * overlayScale : 30 * overlayScale }), jsx(DistanceLabels, { coordinates: renderCoordinates, createMode: createMode, editMode: editMode, completed: completed, showPoints: showPoints, mousePos: mousePos, ghostLastDistance: ghostLastDistance, ghostLastMidpoint: ghostLastMidpoint, ghostFirstDistance: ghostFirstDistance, ghostFirstMidpoint: ghostFirstMidpoint, fontSize: platform === PlatformType.H5 ? 12 * overlayScale : 30 * overlayScale, showFirstDistance: platform !== PlatformType.H5 }), hoverVertex && !dragState.isDragging && (jsx(VertexElement, { cx: hoverVertex.position.x, cy: hoverVertex.position.y, stroke: strokeColor, strokeOpacity: 0.6, fill: "white", fillOpacity: 0.8, pointerEvents: "none" })), ((createMode && showPoints) || editMode || (createMode && completed)) &&
|
|
16404
16411
|
renderCoordinates.map((coord, idx) => {
|
|
16405
16412
|
// 判断当前顶点的状态
|
|
16406
16413
|
const isLastPoint = idx === renderCoordinates.length - 1;
|
|
@@ -16562,7 +16569,7 @@ const BoundaryElement = ({ data }) => {
|
|
|
16562
16569
|
* 点击边界的回调
|
|
16563
16570
|
*/
|
|
16564
16571
|
const onPathClick = useCallback(() => {
|
|
16565
|
-
onSelectElement?.(DataType.BOUNDARY);
|
|
16572
|
+
onSelectElement?.(DataType.BOUNDARY, data);
|
|
16566
16573
|
if (platform === PlatformType.H5) {
|
|
16567
16574
|
// 对于地块来说,如果当前有元素是在编辑和创建模式下,则不进行选中
|
|
16568
16575
|
if (editMapInfo.mobileMode === MobileEditMode.EDIT ||
|
|
@@ -16583,21 +16590,9 @@ const BoundaryElement = ({ data }) => {
|
|
|
16583
16590
|
}));
|
|
16584
16591
|
}
|
|
16585
16592
|
}
|
|
16586
|
-
|
|
16587
|
-
if (editMapInfo?.selectElement)
|
|
16588
|
-
return;
|
|
16589
|
-
setEditMapInfo((prev) => ({
|
|
16590
|
-
...prev,
|
|
16591
|
-
selectElement: data,
|
|
16592
|
-
elementType: DataType.BOUNDARY,
|
|
16593
|
-
editMap: true,
|
|
16594
|
-
}));
|
|
16595
|
-
}
|
|
16596
|
-
}, [platform, data, editMapInfo]);
|
|
16593
|
+
}, [platform, data, editMapInfo, onSelectElement]);
|
|
16597
16594
|
return (jsx(PolygonElement, { points: currentPoints, fillColor: style.fillColor, fillOpacity: style.fillOpacity, strokeColor: style.lineColor, strokeWidth: strokeWidth, editMode: false, onPathClick: onPathClick, onPolygonClick: () => {
|
|
16598
|
-
|
|
16599
|
-
onPathClick();
|
|
16600
|
-
}
|
|
16595
|
+
onPathClick();
|
|
16601
16596
|
}, onCoordinatesChange: (coordinates) => {
|
|
16602
16597
|
console.log('onCoordinatesChange', coordinates);
|
|
16603
16598
|
setEditMapInfo((prev) => ({
|
|
@@ -16714,7 +16709,7 @@ const useHistoryHandle = (props) => {
|
|
|
16714
16709
|
|
|
16715
16710
|
const ObstacleElement = ({ data }) => {
|
|
16716
16711
|
const style = data.style || {};
|
|
16717
|
-
const { editMapInfo, setEditMapInfo, onHandleEnterRecord } = useMapEditContext();
|
|
16712
|
+
const { editMapInfo, setEditMapInfo, onHandleEnterRecord, onSelectElement } = useMapEditContext();
|
|
16718
16713
|
const { platform } = useCommonContext();
|
|
16719
16714
|
const { disabledObstacles } = useSvgEditContext();
|
|
16720
16715
|
const { addHistory } = useHistoryHandle();
|
|
@@ -16759,6 +16754,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16759
16754
|
return dp2px(style.lineWidth || 3);
|
|
16760
16755
|
}, [platform, style, editMapInfo]);
|
|
16761
16756
|
const onPathClick = useCallback(() => {
|
|
16757
|
+
onSelectElement?.(DataType.OBSTACLE, data);
|
|
16762
16758
|
if (platform === PlatformType.H5) {
|
|
16763
16759
|
// h5编辑模式下,禁区只有在start模式下才需要选中
|
|
16764
16760
|
if (editMapInfo.mobileMode === MobileEditMode.EDIT ||
|
|
@@ -16779,27 +16775,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16779
16775
|
}));
|
|
16780
16776
|
}
|
|
16781
16777
|
}
|
|
16782
|
-
|
|
16783
|
-
return;
|
|
16784
|
-
onHandleEnterRecord?.({
|
|
16785
|
-
type: 3,
|
|
16786
|
-
function: 1,
|
|
16787
|
-
zoneId: data.id,
|
|
16788
|
-
})?.then(() => {
|
|
16789
|
-
setEditMapInfo((prev) => ({
|
|
16790
|
-
...prev,
|
|
16791
|
-
selectElement: data,
|
|
16792
|
-
historyList: [
|
|
16793
|
-
{
|
|
16794
|
-
selectElement: data,
|
|
16795
|
-
},
|
|
16796
|
-
],
|
|
16797
|
-
currentHistoryIndex: 0,
|
|
16798
|
-
elementType: DataType.OBSTACLE,
|
|
16799
|
-
editMap: true,
|
|
16800
|
-
}));
|
|
16801
|
-
});
|
|
16802
|
-
}, [disabledObstacles, data, onHandleEnterRecord, editMapInfo]);
|
|
16778
|
+
}, [data, editMapInfo, onSelectElement]);
|
|
16803
16779
|
const editMode = useMemo(() => {
|
|
16804
16780
|
if (platform === PlatformType.H5) {
|
|
16805
16781
|
return (editMapInfo?.mobileMode === MobileEditMode.EDIT &&
|
|
@@ -16808,10 +16784,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16808
16784
|
return editMapInfo?.selectElement?.id === data.id;
|
|
16809
16785
|
}, [editMapInfo, data, platform]);
|
|
16810
16786
|
return (jsx(PolygonElement, { points: currentPoints, fillColor: style.fillColor, fillOpacity: style.fillOpacity, strokeColor: style.lineColor, strokeWidth: strokeWidth, editMode: editMode, showPoints: editMapInfo?.selectElement?.id === data.id, onPathClick: onPathClick, onPolygonClick: () => {
|
|
16811
|
-
|
|
16812
|
-
if (platform === PlatformType.H5) {
|
|
16813
|
-
onPathClick();
|
|
16814
|
-
}
|
|
16787
|
+
onPathClick();
|
|
16815
16788
|
}, onVertexDelete: (vertexIndex) => handleCreateVertexDelete(vertexIndex), onCoordinatesChange: (coordinates) => {
|
|
16816
16789
|
console.log('onCoordinatesChange', coordinates);
|
|
16817
16790
|
if (platform === PlatformType.H5 && editMapInfo.mobileMode === MobileEditMode.CREATE) {
|
|
@@ -17517,9 +17490,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
17517
17490
|
return (jsxs("g", { ref: containerRef, className: `vision-off-transform-wrapper ${className} ${isSelected ? 'selected' : ''}`, "data-transform-wrapper": "true", children: [jsx(PolygonElement, { points: visionOffData?.points, fillColor: style.fillColor, fillOpacity: style.fillOpacity, strokeColor: style.lineColor, strokeWidth: strokeWidth, editMode: false, onPathClick: () => {
|
|
17518
17491
|
onSelect?.();
|
|
17519
17492
|
}, onPolygonClick: () => {
|
|
17520
|
-
|
|
17521
|
-
onSelect?.();
|
|
17522
|
-
}
|
|
17493
|
+
onSelect?.();
|
|
17523
17494
|
} }), isSelected && currentPoints.length === 4 && (jsx("polygon", { points: currentPoints.map((point) => `${point.x},${point.y}`).join(' '), fill: "transparent", stroke: "none", style: { cursor: 'move' }, ...(platform === PlatformType.H5
|
|
17524
17495
|
? {
|
|
17525
17496
|
onTouchStart: createReactEventHandler((e) => {
|
|
@@ -17601,7 +17572,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
17601
17572
|
};
|
|
17602
17573
|
|
|
17603
17574
|
const VisionOffElement = ({ data, onSelect }) => {
|
|
17604
|
-
const { setEditMapInfo, onHandleEnterRecord, editMapInfo } = useMapEditContext();
|
|
17575
|
+
const { setEditMapInfo, onHandleEnterRecord, editMapInfo, onSelectElement } = useMapEditContext();
|
|
17605
17576
|
const { addHistory } = useHistoryHandle();
|
|
17606
17577
|
const { platform } = useCommonContext();
|
|
17607
17578
|
const isSelected = useMemo(() => {
|
|
@@ -17614,6 +17585,7 @@ const VisionOffElement = ({ data, onSelect }) => {
|
|
|
17614
17585
|
return editMapInfo?.selectElement?.id === data.id;
|
|
17615
17586
|
}, [editMapInfo, data, platform]);
|
|
17616
17587
|
const handleSelect = useCallback(() => {
|
|
17588
|
+
onSelectElement?.(DataType.VISION_OFF, data);
|
|
17617
17589
|
if (platform === PlatformType.H5) {
|
|
17618
17590
|
// h5编辑模式下,
|
|
17619
17591
|
// start模式可以任意选
|
|
@@ -17648,26 +17620,26 @@ const VisionOffElement = ({ data, onSelect }) => {
|
|
|
17648
17620
|
}
|
|
17649
17621
|
if (editMapInfo?.selectElement)
|
|
17650
17622
|
return;
|
|
17651
|
-
return onHandleEnterRecord?.({
|
|
17652
|
-
|
|
17653
|
-
|
|
17654
|
-
})?.then(() => {
|
|
17655
|
-
|
|
17656
|
-
|
|
17657
|
-
|
|
17658
|
-
|
|
17659
|
-
|
|
17660
|
-
|
|
17661
|
-
|
|
17662
|
-
|
|
17663
|
-
|
|
17664
|
-
|
|
17665
|
-
|
|
17666
|
-
|
|
17667
|
-
|
|
17668
|
-
|
|
17669
|
-
});
|
|
17670
|
-
}, [data, onHandleEnterRecord, platform, editMapInfo]);
|
|
17623
|
+
// return onHandleEnterRecord?.({
|
|
17624
|
+
// type: 2,
|
|
17625
|
+
// function: 1,
|
|
17626
|
+
// })?.then(() => {
|
|
17627
|
+
// onSelect?.();
|
|
17628
|
+
// setEditMapInfo((prev: EditMapInfo) => ({
|
|
17629
|
+
// ...prev,
|
|
17630
|
+
// selectElement: data,
|
|
17631
|
+
// elementType: DataType.VISION_OFF,
|
|
17632
|
+
// historyList: [
|
|
17633
|
+
// {
|
|
17634
|
+
// selectElement: data,
|
|
17635
|
+
// },
|
|
17636
|
+
// ],
|
|
17637
|
+
// currentHistoryIndex: 0,
|
|
17638
|
+
// editMap: true,
|
|
17639
|
+
// isShowDrag: true,
|
|
17640
|
+
// }));
|
|
17641
|
+
// });
|
|
17642
|
+
}, [data, onHandleEnterRecord, platform, editMapInfo, onSelectElement]);
|
|
17671
17643
|
const onCancel = useCallback(() => {
|
|
17672
17644
|
if (platform === PlatformType.H5) {
|
|
17673
17645
|
// 在h5中,这里的取消其实对应的是删除元素
|
|
@@ -18400,7 +18372,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
18400
18372
|
};
|
|
18401
18373
|
|
|
18402
18374
|
const DoodleElement = ({ data }) => {
|
|
18403
|
-
const { editMapInfo, setEditMapInfo,
|
|
18375
|
+
const { editMapInfo, setEditMapInfo, onHandleEvent, onSelectElement } = useMapEditContext();
|
|
18404
18376
|
const { addHistory } = useHistoryHandle();
|
|
18405
18377
|
const { platform, doodleList } = useCommonContext();
|
|
18406
18378
|
const isSelected = useMemo(() => {
|
|
@@ -18449,6 +18421,7 @@ const DoodleElement = ({ data }) => {
|
|
|
18449
18421
|
}, [data]);
|
|
18450
18422
|
const handleTransformChange = (transform) => { };
|
|
18451
18423
|
const handleSelect = useCallback(() => {
|
|
18424
|
+
onSelectElement?.(DataType.DOODLE, data);
|
|
18452
18425
|
if (platform === PlatformType.H5) {
|
|
18453
18426
|
// h5编辑模式下,
|
|
18454
18427
|
// 如果是创建,只能选择新建的doodle
|
|
@@ -18465,34 +18438,29 @@ const DoodleElement = ({ data }) => {
|
|
|
18465
18438
|
}));
|
|
18466
18439
|
return;
|
|
18467
18440
|
}
|
|
18468
|
-
if (editMapInfo?.selectElement) {
|
|
18469
|
-
|
|
18470
|
-
}
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
|
|
18474
|
-
|
|
18475
|
-
|
|
18476
|
-
|
|
18477
|
-
|
|
18478
|
-
|
|
18479
|
-
|
|
18480
|
-
|
|
18481
|
-
|
|
18482
|
-
|
|
18483
|
-
|
|
18484
|
-
|
|
18485
|
-
|
|
18486
|
-
|
|
18487
|
-
|
|
18488
|
-
|
|
18489
|
-
|
|
18490
|
-
|
|
18491
|
-
editMap: true,
|
|
18492
|
-
isShowDrag: true,
|
|
18493
|
-
}));
|
|
18494
|
-
});
|
|
18495
|
-
}, [data, onHandleEnterRecord, platform, editMapInfo]);
|
|
18441
|
+
// if (editMapInfo?.selectElement) {
|
|
18442
|
+
// return;
|
|
18443
|
+
// }
|
|
18444
|
+
// setEditMapInfo((prev: EditMapInfo) => ({
|
|
18445
|
+
// ...prev,
|
|
18446
|
+
// historyList: [
|
|
18447
|
+
// {
|
|
18448
|
+
// selectElement: {
|
|
18449
|
+
// ...data,
|
|
18450
|
+
// transformedPoints: transformedElements,
|
|
18451
|
+
// },
|
|
18452
|
+
// },
|
|
18453
|
+
// ],
|
|
18454
|
+
// currentHistoryIndex: 0,
|
|
18455
|
+
// selectElement: {
|
|
18456
|
+
// ...data,
|
|
18457
|
+
// transformedPoints: transformedElements,
|
|
18458
|
+
// },
|
|
18459
|
+
// elementType: DataType.DOODLE,
|
|
18460
|
+
// editMap: true,
|
|
18461
|
+
// isShowDrag: true,
|
|
18462
|
+
// }));
|
|
18463
|
+
}, [data, platform, editMapInfo, onSelectElement]);
|
|
18496
18464
|
const handleCancel = useCallback(() => {
|
|
18497
18465
|
if (platform === PlatformType.H5) {
|
|
18498
18466
|
setEditMapInfo((prev) => ({
|
|
@@ -18542,7 +18510,6 @@ const DoodleElement = ({ data }) => {
|
|
|
18542
18510
|
},
|
|
18543
18511
|
});
|
|
18544
18512
|
}, [transformedElements]);
|
|
18545
|
-
console.log('isSelectedWithoutOperation--->', editMapInfo, isSelectedWithoutOperation, isSelected);
|
|
18546
18513
|
return (jsx(DoodleTransformWrapper, { data: originData, onTransformChange: handleTransformChange, isSelected: isSelected, isSelectedWithoutOperation: isSelectedWithoutOperation, onSelect: handleSelect, onCancel: handleCancel, onDragEnd: handleDragEnd, showInfo: platform === PlatformType.H5, onClickInfo: handleClickInfo, minScale: minScale }));
|
|
18547
18514
|
};
|
|
18548
18515
|
|
package/dist/index.js
CHANGED
|
@@ -15233,10 +15233,10 @@ const calculatePhysicalDistance$1 = (point1, point2) => {
|
|
|
15233
15233
|
const calculateMidpoint$1 = (point1, point2) => {
|
|
15234
15234
|
return [(point1[0] + point2[0]) / 2, (point1[1] + point2[1]) / 2];
|
|
15235
15235
|
};
|
|
15236
|
-
const DistanceLabels = ({ coordinates, createMode = false, editMode = false, completed = false, showPoints = false, mousePos: _mousePos = null, ghostLastDistance = null, ghostLastMidpoint = null, ghostFirstDistance = null, ghostFirstMidpoint = null, fontSize = 30, }) => {
|
|
15236
|
+
const DistanceLabels = ({ coordinates, createMode = false, editMode = false, completed = false, showPoints = false, mousePos: _mousePos = null, ghostLastDistance = null, ghostLastMidpoint = null, ghostFirstDistance = null, ghostFirstMidpoint = null, fontSize = 30, showFirstDistance = true, }) => {
|
|
15237
15237
|
// 只在显示可操作顶点时显示距离
|
|
15238
15238
|
if (!((createMode && showPoints) || editMode || (createMode && completed)) ||
|
|
15239
|
-
coordinates.length < 2) {
|
|
15239
|
+
coordinates.length < (showFirstDistance ? 1 : 2)) {
|
|
15240
15240
|
return null;
|
|
15241
15241
|
}
|
|
15242
15242
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [coordinates.map((coord, idx) => {
|
|
@@ -15248,6 +15248,10 @@ const DistanceLabels = ({ coordinates, createMode = false, editMode = false, com
|
|
|
15248
15248
|
}
|
|
15249
15249
|
const midpoint = calculateMidpoint$1(coord, nextCoord);
|
|
15250
15250
|
const distance = calculatePhysicalDistance$1(coord, nextCoord);
|
|
15251
|
+
// 如果当前点和下一个点坐标一致则不现实,处理头尾点一样的问题
|
|
15252
|
+
if (coord[0] === nextCoord[0] && coord[1] === nextCoord[1]) {
|
|
15253
|
+
return null;
|
|
15254
|
+
}
|
|
15251
15255
|
return (jsxRuntime.jsx(TextElement, { x: midpoint[0], y: midpoint[1], textAnchor: "middle", alignmentBaseline: "middle", fontSize: fontSize, fill: "#fff", style: {
|
|
15252
15256
|
pointerEvents: 'none',
|
|
15253
15257
|
fontWeight: 'bold',
|
|
@@ -15269,7 +15273,7 @@ const DistanceLabels = ({ coordinates, createMode = false, editMode = false, com
|
|
|
15269
15273
|
} }))] }));
|
|
15270
15274
|
};
|
|
15271
15275
|
|
|
15272
|
-
var css_248z$2 = ".index-module_polygonPathG__S-Bpl {\n
|
|
15276
|
+
var css_248z$2 = ".index-module_polygonPathG__S-Bpl {\n cursor: pointer;\n}\n\n.index-module_vertex__-Qb1u {\n cursor: pointer;\n}\n\n.index-module_dragging__xSFdO {\n cursor: grabbing;\n}\n\n.index-module_createVertex__ldz2E {\n cursor: crosshair;\n}\n\n.index-module_addVertex__hrF71 {\n cursor: pointer;\n}\n\n.index-module_polygonPath__PynOn {\n pointer-events: stroke;\n cursor: pointer;\n}\n\n.index-module_notCreate__bFnkV {\n cursor: no-drop;\n}";
|
|
15273
15277
|
var styles$2 = {"polygonPathG":"index-module_polygonPathG__S-Bpl","vertex":"index-module_vertex__-Qb1u","dragging":"index-module_dragging__xSFdO","addVertex":"index-module_addVertex__hrF71","polygonPath":"index-module_polygonPath__PynOn","notCreate":"index-module_notCreate__bFnkV"};
|
|
15274
15278
|
styleInject(css_248z$2);
|
|
15275
15279
|
|
|
@@ -15690,10 +15694,6 @@ const useCheckElement = () => {
|
|
|
15690
15694
|
return false;
|
|
15691
15695
|
// 获取当前正在创建的 obstacle 的点
|
|
15692
15696
|
const currentObstaclePoints = coordinatesToPoints$1(points) || [];
|
|
15693
|
-
if (platform !== exports.PlatformType.H5) {
|
|
15694
|
-
if (currentObstaclePoints.length === 0)
|
|
15695
|
-
return false; // 还没有开始绘制
|
|
15696
|
-
}
|
|
15697
15697
|
// 构建当前 obstacle 的多边形(包括检查点位置)
|
|
15698
15698
|
const currentObstaclePolygon = [...currentObstaclePoints, checkPoint];
|
|
15699
15699
|
// 获取当前边界内的所有元素
|
|
@@ -15855,9 +15855,16 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
15855
15855
|
const { editMapInfo } = useMapEditContext();
|
|
15856
15856
|
const { platform } = useCommonContext();
|
|
15857
15857
|
// delete icon可能被上一个点遮挡,因为delete在右上方,所以手动处理点让点按照顺时针渲染,这样delete icon层级就会高一些
|
|
15858
|
+
// 编辑的场景禁区的点最后一个和第一个相同,会导致一个位置渲染两个点,需要额外处理下
|
|
15858
15859
|
const coordinates = React.useMemo(() => {
|
|
15859
|
-
|
|
15860
|
-
|
|
15860
|
+
const temp = editMapInfo?.createMode === exports.CreateStatus.CREATING ? points : [...points].reverse();
|
|
15861
|
+
const firstPoint = temp[0] || [];
|
|
15862
|
+
const lastPoint = temp[temp.length - 1] || [];
|
|
15863
|
+
if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1] && editMapInfo?.editMap) {
|
|
15864
|
+
return temp.slice(0, -1);
|
|
15865
|
+
}
|
|
15866
|
+
return temp;
|
|
15867
|
+
}, [points, editMapInfo?.createMode, editMapInfo?.editMap]);
|
|
15861
15868
|
// 计算点到线段的垂足坐标(使用通用工具函数)
|
|
15862
15869
|
const calculatePerpendicularFoot$1 = React.useCallback((point, lineStart, lineEnd) => {
|
|
15863
15870
|
return calculatePerpendicularFoot(point, lineStart, lineEnd);
|
|
@@ -16370,7 +16377,7 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
16370
16377
|
const prevIndex = (dragState.dragIndex - 1 + coordinates.length) % coordinates.length;
|
|
16371
16378
|
const nextIndex = (dragState.dragIndex + 1) % coordinates.length;
|
|
16372
16379
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("line", { x1: coordinates[prevIndex][0], y1: coordinates[prevIndex][1], x2: dragState.originalPosition[0], y2: dragState.originalPosition[1], stroke: strokeColor, strokeWidth: strokeWidth, strokeOpacity: 0.5, strokeDasharray: "5,5", pointerEvents: "none" }), jsxRuntime.jsx("line", { x1: dragState.originalPosition[0], y1: dragState.originalPosition[1], x2: coordinates[nextIndex][0], y2: coordinates[nextIndex][1], stroke: strokeColor, strokeWidth: strokeWidth, strokeOpacity: 0.5, strokeDasharray: "5,5", pointerEvents: "none" })] }));
|
|
16373
|
-
})()] })), renderCoordinates.length >= 3 && (jsxRuntime.jsx("polygon", { className:
|
|
16380
|
+
})()] })), renderCoordinates.length >= 3 && (jsxRuntime.jsx("polygon", { className: editMapInfo?.editMap ? styles$2.polygonPathG : '', points: polygonPoints, fill: fillColor, fillOpacity: fillOpacity, stroke: "none" // 边框透明
|
|
16374
16381
|
, onClick: onPolygonClick })), jsxRuntime.jsxs("g", { className: styles$2.polygonPathG, children: [renderCoordinates.length >= 2 &&
|
|
16375
16382
|
pathSegments.map((segment, index) => {
|
|
16376
16383
|
if (segment.points.length < 2)
|
|
@@ -16420,7 +16427,7 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
16420
16427
|
setHoverVertex(null);
|
|
16421
16428
|
},
|
|
16422
16429
|
}) }, `edge-${index}`));
|
|
16423
|
-
}), ghostLastPath && (jsxRuntime.jsx("path", { d: ghostLastPath, stroke: strokeColor, strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", opacity: 0.7, onClick: onPathClick })), ghostFirstPath && renderCoordinates.length >= 2 && (jsxRuntime.jsx("path", { d: ghostFirstPath, stroke: strokeColor, strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", opacity: 0.7, onClick: onPathClick })), jsxRuntime.jsx(DragDistanceIndicator, { dragState: dragState, strokeColor: strokeColor, editMode: editMode, createMode: createMode, completed: completed, fontSize: platform === exports.PlatformType.H5 ? 12 * overlayScale : 30 * overlayScale }), jsxRuntime.jsx(DistanceLabels, { coordinates: renderCoordinates, createMode: createMode, editMode: editMode, completed: completed, showPoints: showPoints, mousePos: mousePos, ghostLastDistance: ghostLastDistance, ghostLastMidpoint: ghostLastMidpoint, ghostFirstDistance: ghostFirstDistance, ghostFirstMidpoint: ghostFirstMidpoint, fontSize: platform === exports.PlatformType.H5 ? 12 * overlayScale : 30 * overlayScale }), hoverVertex && !dragState.isDragging && (jsxRuntime.jsx(VertexElement, { cx: hoverVertex.position.x, cy: hoverVertex.position.y, stroke: strokeColor, strokeOpacity: 0.6, fill: "white", fillOpacity: 0.8, pointerEvents: "none" })), ((createMode && showPoints) || editMode || (createMode && completed)) &&
|
|
16430
|
+
}), ghostLastPath && (jsxRuntime.jsx("path", { d: ghostLastPath, stroke: strokeColor, strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", opacity: 0.7, onClick: onPathClick })), ghostFirstPath && renderCoordinates.length >= 2 && (jsxRuntime.jsx("path", { d: ghostFirstPath, stroke: strokeColor, strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", opacity: 0.7, onClick: onPathClick })), jsxRuntime.jsx(DragDistanceIndicator, { dragState: dragState, strokeColor: strokeColor, editMode: editMode, createMode: createMode, completed: completed, fontSize: platform === exports.PlatformType.H5 ? 12 * overlayScale : 30 * overlayScale }), jsxRuntime.jsx(DistanceLabels, { coordinates: renderCoordinates, createMode: createMode, editMode: editMode, completed: completed, showPoints: showPoints, mousePos: mousePos, ghostLastDistance: ghostLastDistance, ghostLastMidpoint: ghostLastMidpoint, ghostFirstDistance: ghostFirstDistance, ghostFirstMidpoint: ghostFirstMidpoint, fontSize: platform === exports.PlatformType.H5 ? 12 * overlayScale : 30 * overlayScale, showFirstDistance: platform !== exports.PlatformType.H5 }), hoverVertex && !dragState.isDragging && (jsxRuntime.jsx(VertexElement, { cx: hoverVertex.position.x, cy: hoverVertex.position.y, stroke: strokeColor, strokeOpacity: 0.6, fill: "white", fillOpacity: 0.8, pointerEvents: "none" })), ((createMode && showPoints) || editMode || (createMode && completed)) &&
|
|
16424
16431
|
renderCoordinates.map((coord, idx) => {
|
|
16425
16432
|
// 判断当前顶点的状态
|
|
16426
16433
|
const isLastPoint = idx === renderCoordinates.length - 1;
|
|
@@ -16582,7 +16589,7 @@ const BoundaryElement = ({ data }) => {
|
|
|
16582
16589
|
* 点击边界的回调
|
|
16583
16590
|
*/
|
|
16584
16591
|
const onPathClick = React.useCallback(() => {
|
|
16585
|
-
onSelectElement?.(exports.DataType.BOUNDARY);
|
|
16592
|
+
onSelectElement?.(exports.DataType.BOUNDARY, data);
|
|
16586
16593
|
if (platform === exports.PlatformType.H5) {
|
|
16587
16594
|
// 对于地块来说,如果当前有元素是在编辑和创建模式下,则不进行选中
|
|
16588
16595
|
if (editMapInfo.mobileMode === exports.MobileEditMode.EDIT ||
|
|
@@ -16603,21 +16610,9 @@ const BoundaryElement = ({ data }) => {
|
|
|
16603
16610
|
}));
|
|
16604
16611
|
}
|
|
16605
16612
|
}
|
|
16606
|
-
|
|
16607
|
-
if (editMapInfo?.selectElement)
|
|
16608
|
-
return;
|
|
16609
|
-
setEditMapInfo((prev) => ({
|
|
16610
|
-
...prev,
|
|
16611
|
-
selectElement: data,
|
|
16612
|
-
elementType: exports.DataType.BOUNDARY,
|
|
16613
|
-
editMap: true,
|
|
16614
|
-
}));
|
|
16615
|
-
}
|
|
16616
|
-
}, [platform, data, editMapInfo]);
|
|
16613
|
+
}, [platform, data, editMapInfo, onSelectElement]);
|
|
16617
16614
|
return (jsxRuntime.jsx(PolygonElement, { points: currentPoints, fillColor: style.fillColor, fillOpacity: style.fillOpacity, strokeColor: style.lineColor, strokeWidth: strokeWidth, editMode: false, onPathClick: onPathClick, onPolygonClick: () => {
|
|
16618
|
-
|
|
16619
|
-
onPathClick();
|
|
16620
|
-
}
|
|
16615
|
+
onPathClick();
|
|
16621
16616
|
}, onCoordinatesChange: (coordinates) => {
|
|
16622
16617
|
console.log('onCoordinatesChange', coordinates);
|
|
16623
16618
|
setEditMapInfo((prev) => ({
|
|
@@ -16734,7 +16729,7 @@ const useHistoryHandle = (props) => {
|
|
|
16734
16729
|
|
|
16735
16730
|
const ObstacleElement = ({ data }) => {
|
|
16736
16731
|
const style = data.style || {};
|
|
16737
|
-
const { editMapInfo, setEditMapInfo, onHandleEnterRecord } = useMapEditContext();
|
|
16732
|
+
const { editMapInfo, setEditMapInfo, onHandleEnterRecord, onSelectElement } = useMapEditContext();
|
|
16738
16733
|
const { platform } = useCommonContext();
|
|
16739
16734
|
const { disabledObstacles } = useSvgEditContext();
|
|
16740
16735
|
const { addHistory } = useHistoryHandle();
|
|
@@ -16779,6 +16774,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16779
16774
|
return dp2px(style.lineWidth || 3);
|
|
16780
16775
|
}, [platform, style, editMapInfo]);
|
|
16781
16776
|
const onPathClick = React.useCallback(() => {
|
|
16777
|
+
onSelectElement?.(exports.DataType.OBSTACLE, data);
|
|
16782
16778
|
if (platform === exports.PlatformType.H5) {
|
|
16783
16779
|
// h5编辑模式下,禁区只有在start模式下才需要选中
|
|
16784
16780
|
if (editMapInfo.mobileMode === exports.MobileEditMode.EDIT ||
|
|
@@ -16799,27 +16795,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16799
16795
|
}));
|
|
16800
16796
|
}
|
|
16801
16797
|
}
|
|
16802
|
-
|
|
16803
|
-
return;
|
|
16804
|
-
onHandleEnterRecord?.({
|
|
16805
|
-
type: 3,
|
|
16806
|
-
function: 1,
|
|
16807
|
-
zoneId: data.id,
|
|
16808
|
-
})?.then(() => {
|
|
16809
|
-
setEditMapInfo((prev) => ({
|
|
16810
|
-
...prev,
|
|
16811
|
-
selectElement: data,
|
|
16812
|
-
historyList: [
|
|
16813
|
-
{
|
|
16814
|
-
selectElement: data,
|
|
16815
|
-
},
|
|
16816
|
-
],
|
|
16817
|
-
currentHistoryIndex: 0,
|
|
16818
|
-
elementType: exports.DataType.OBSTACLE,
|
|
16819
|
-
editMap: true,
|
|
16820
|
-
}));
|
|
16821
|
-
});
|
|
16822
|
-
}, [disabledObstacles, data, onHandleEnterRecord, editMapInfo]);
|
|
16798
|
+
}, [data, editMapInfo, onSelectElement]);
|
|
16823
16799
|
const editMode = React.useMemo(() => {
|
|
16824
16800
|
if (platform === exports.PlatformType.H5) {
|
|
16825
16801
|
return (editMapInfo?.mobileMode === exports.MobileEditMode.EDIT &&
|
|
@@ -16828,10 +16804,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16828
16804
|
return editMapInfo?.selectElement?.id === data.id;
|
|
16829
16805
|
}, [editMapInfo, data, platform]);
|
|
16830
16806
|
return (jsxRuntime.jsx(PolygonElement, { points: currentPoints, fillColor: style.fillColor, fillOpacity: style.fillOpacity, strokeColor: style.lineColor, strokeWidth: strokeWidth, editMode: editMode, showPoints: editMapInfo?.selectElement?.id === data.id, onPathClick: onPathClick, onPolygonClick: () => {
|
|
16831
|
-
|
|
16832
|
-
if (platform === exports.PlatformType.H5) {
|
|
16833
|
-
onPathClick();
|
|
16834
|
-
}
|
|
16807
|
+
onPathClick();
|
|
16835
16808
|
}, onVertexDelete: (vertexIndex) => handleCreateVertexDelete(vertexIndex), onCoordinatesChange: (coordinates) => {
|
|
16836
16809
|
console.log('onCoordinatesChange', coordinates);
|
|
16837
16810
|
if (platform === exports.PlatformType.H5 && editMapInfo.mobileMode === exports.MobileEditMode.CREATE) {
|
|
@@ -17537,9 +17510,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
17537
17510
|
return (jsxRuntime.jsxs("g", { ref: containerRef, className: `vision-off-transform-wrapper ${className} ${isSelected ? 'selected' : ''}`, "data-transform-wrapper": "true", children: [jsxRuntime.jsx(PolygonElement, { points: visionOffData?.points, fillColor: style.fillColor, fillOpacity: style.fillOpacity, strokeColor: style.lineColor, strokeWidth: strokeWidth, editMode: false, onPathClick: () => {
|
|
17538
17511
|
onSelect?.();
|
|
17539
17512
|
}, onPolygonClick: () => {
|
|
17540
|
-
|
|
17541
|
-
onSelect?.();
|
|
17542
|
-
}
|
|
17513
|
+
onSelect?.();
|
|
17543
17514
|
} }), isSelected && currentPoints.length === 4 && (jsxRuntime.jsx("polygon", { points: currentPoints.map((point) => `${point.x},${point.y}`).join(' '), fill: "transparent", stroke: "none", style: { cursor: 'move' }, ...(platform === exports.PlatformType.H5
|
|
17544
17515
|
? {
|
|
17545
17516
|
onTouchStart: createReactEventHandler((e) => {
|
|
@@ -17621,7 +17592,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
17621
17592
|
};
|
|
17622
17593
|
|
|
17623
17594
|
const VisionOffElement = ({ data, onSelect }) => {
|
|
17624
|
-
const { setEditMapInfo, onHandleEnterRecord, editMapInfo } = useMapEditContext();
|
|
17595
|
+
const { setEditMapInfo, onHandleEnterRecord, editMapInfo, onSelectElement } = useMapEditContext();
|
|
17625
17596
|
const { addHistory } = useHistoryHandle();
|
|
17626
17597
|
const { platform } = useCommonContext();
|
|
17627
17598
|
const isSelected = React.useMemo(() => {
|
|
@@ -17634,6 +17605,7 @@ const VisionOffElement = ({ data, onSelect }) => {
|
|
|
17634
17605
|
return editMapInfo?.selectElement?.id === data.id;
|
|
17635
17606
|
}, [editMapInfo, data, platform]);
|
|
17636
17607
|
const handleSelect = React.useCallback(() => {
|
|
17608
|
+
onSelectElement?.(exports.DataType.VISION_OFF, data);
|
|
17637
17609
|
if (platform === exports.PlatformType.H5) {
|
|
17638
17610
|
// h5编辑模式下,
|
|
17639
17611
|
// start模式可以任意选
|
|
@@ -17668,26 +17640,26 @@ const VisionOffElement = ({ data, onSelect }) => {
|
|
|
17668
17640
|
}
|
|
17669
17641
|
if (editMapInfo?.selectElement)
|
|
17670
17642
|
return;
|
|
17671
|
-
return onHandleEnterRecord?.({
|
|
17672
|
-
|
|
17673
|
-
|
|
17674
|
-
})?.then(() => {
|
|
17675
|
-
|
|
17676
|
-
|
|
17677
|
-
|
|
17678
|
-
|
|
17679
|
-
|
|
17680
|
-
|
|
17681
|
-
|
|
17682
|
-
|
|
17683
|
-
|
|
17684
|
-
|
|
17685
|
-
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
});
|
|
17690
|
-
}, [data, onHandleEnterRecord, platform, editMapInfo]);
|
|
17643
|
+
// return onHandleEnterRecord?.({
|
|
17644
|
+
// type: 2,
|
|
17645
|
+
// function: 1,
|
|
17646
|
+
// })?.then(() => {
|
|
17647
|
+
// onSelect?.();
|
|
17648
|
+
// setEditMapInfo((prev: EditMapInfo) => ({
|
|
17649
|
+
// ...prev,
|
|
17650
|
+
// selectElement: data,
|
|
17651
|
+
// elementType: DataType.VISION_OFF,
|
|
17652
|
+
// historyList: [
|
|
17653
|
+
// {
|
|
17654
|
+
// selectElement: data,
|
|
17655
|
+
// },
|
|
17656
|
+
// ],
|
|
17657
|
+
// currentHistoryIndex: 0,
|
|
17658
|
+
// editMap: true,
|
|
17659
|
+
// isShowDrag: true,
|
|
17660
|
+
// }));
|
|
17661
|
+
// });
|
|
17662
|
+
}, [data, onHandleEnterRecord, platform, editMapInfo, onSelectElement]);
|
|
17691
17663
|
const onCancel = React.useCallback(() => {
|
|
17692
17664
|
if (platform === exports.PlatformType.H5) {
|
|
17693
17665
|
// 在h5中,这里的取消其实对应的是删除元素
|
|
@@ -18420,7 +18392,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
18420
18392
|
};
|
|
18421
18393
|
|
|
18422
18394
|
const DoodleElement = ({ data }) => {
|
|
18423
|
-
const { editMapInfo, setEditMapInfo,
|
|
18395
|
+
const { editMapInfo, setEditMapInfo, onHandleEvent, onSelectElement } = useMapEditContext();
|
|
18424
18396
|
const { addHistory } = useHistoryHandle();
|
|
18425
18397
|
const { platform, doodleList } = useCommonContext();
|
|
18426
18398
|
const isSelected = React.useMemo(() => {
|
|
@@ -18469,6 +18441,7 @@ const DoodleElement = ({ data }) => {
|
|
|
18469
18441
|
}, [data]);
|
|
18470
18442
|
const handleTransformChange = (transform) => { };
|
|
18471
18443
|
const handleSelect = React.useCallback(() => {
|
|
18444
|
+
onSelectElement?.(exports.DataType.DOODLE, data);
|
|
18472
18445
|
if (platform === exports.PlatformType.H5) {
|
|
18473
18446
|
// h5编辑模式下,
|
|
18474
18447
|
// 如果是创建,只能选择新建的doodle
|
|
@@ -18485,34 +18458,29 @@ const DoodleElement = ({ data }) => {
|
|
|
18485
18458
|
}));
|
|
18486
18459
|
return;
|
|
18487
18460
|
}
|
|
18488
|
-
if (editMapInfo?.selectElement) {
|
|
18489
|
-
|
|
18490
|
-
}
|
|
18491
|
-
|
|
18492
|
-
|
|
18493
|
-
|
|
18494
|
-
|
|
18495
|
-
|
|
18496
|
-
|
|
18497
|
-
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
|
|
18503
|
-
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
|
|
18510
|
-
|
|
18511
|
-
editMap: true,
|
|
18512
|
-
isShowDrag: true,
|
|
18513
|
-
}));
|
|
18514
|
-
});
|
|
18515
|
-
}, [data, onHandleEnterRecord, platform, editMapInfo]);
|
|
18461
|
+
// if (editMapInfo?.selectElement) {
|
|
18462
|
+
// return;
|
|
18463
|
+
// }
|
|
18464
|
+
// setEditMapInfo((prev: EditMapInfo) => ({
|
|
18465
|
+
// ...prev,
|
|
18466
|
+
// historyList: [
|
|
18467
|
+
// {
|
|
18468
|
+
// selectElement: {
|
|
18469
|
+
// ...data,
|
|
18470
|
+
// transformedPoints: transformedElements,
|
|
18471
|
+
// },
|
|
18472
|
+
// },
|
|
18473
|
+
// ],
|
|
18474
|
+
// currentHistoryIndex: 0,
|
|
18475
|
+
// selectElement: {
|
|
18476
|
+
// ...data,
|
|
18477
|
+
// transformedPoints: transformedElements,
|
|
18478
|
+
// },
|
|
18479
|
+
// elementType: DataType.DOODLE,
|
|
18480
|
+
// editMap: true,
|
|
18481
|
+
// isShowDrag: true,
|
|
18482
|
+
// }));
|
|
18483
|
+
}, [data, platform, editMapInfo, onSelectElement]);
|
|
18516
18484
|
const handleCancel = React.useCallback(() => {
|
|
18517
18485
|
if (platform === exports.PlatformType.H5) {
|
|
18518
18486
|
setEditMapInfo((prev) => ({
|
|
@@ -18562,7 +18530,6 @@ const DoodleElement = ({ data }) => {
|
|
|
18562
18530
|
},
|
|
18563
18531
|
});
|
|
18564
18532
|
}, [transformedElements]);
|
|
18565
|
-
console.log('isSelectedWithoutOperation--->', editMapInfo, isSelectedWithoutOperation, isSelected);
|
|
18566
18533
|
return (jsxRuntime.jsx(DoodleTransformWrapper, { data: originData, onTransformChange: handleTransformChange, isSelected: isSelected, isSelectedWithoutOperation: isSelectedWithoutOperation, onSelect: handleSelect, onCancel: handleCancel, onDragEnd: handleDragEnd, showInfo: platform === exports.PlatformType.H5, onClickInfo: handleClickInfo, minScale: minScale }));
|
|
18567
18534
|
};
|
|
18568
18535
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAcf,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAcf,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AA4B3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAgGD,eAAO,MAAM,gBAAgB,mGAqsB5B,CAAC;AAIF,eAAe,gBAAgB,CAAC;AAChC,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckElement.d.ts","sourceRoot":"","sources":["../../../../src/render/svgEditMap/hooks/useCheckElement.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,eAAe;;;;;;;;8CA+HX;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,gBAAgB,MAAM,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"useCheckElement.d.ts","sourceRoot":"","sources":["../../../../src/render/svgEditMap/hooks/useCheckElement.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,eAAe;;;;;;;;8CA+HX;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,gBAAgB,MAAM,EAAE,EAAE;CA+FlE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/BoundaryElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAY,MAAM,qBAAqB,CAAC;AAa7D,UAAU,oBAAoB;IAC5B,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,GAAI,UAAU,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/BoundaryElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAY,MAAM,qBAAqB,CAAC;AAa7D,UAAU,oBAAoB;IAC5B,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,GAAI,UAAU,oBAAoB,4CA4EtD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/DoodleElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAS3D,UAAU,kBAAkB;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,QAAA,MAAM,aAAa,GAAI,UAAU,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/DoodleElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAS3D,UAAU,kBAAkB;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,QAAA,MAAM,aAAa,GAAI,UAAU,kBAAkB,4CAiLlD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/ObstacleElement/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAY7D,UAAU,oBAAoB;IAC5B,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,GAAI,UAAU,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/ObstacleElement/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAY7D,UAAU,oBAAoB;IAC5B,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,GAAI,UAAU,oBAAoB,4CAgItD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -14,6 +14,7 @@ interface DistanceLabelsProps {
|
|
|
14
14
|
ghostFirstDistance?: string | null;
|
|
15
15
|
ghostFirstMidpoint?: [number, number] | null;
|
|
16
16
|
fontSize?: number;
|
|
17
|
+
showFirstDistance?: boolean;
|
|
17
18
|
}
|
|
18
19
|
declare const DistanceLabels: React.FC<DistanceLabelsProps>;
|
|
19
20
|
export default DistanceLabels;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DistanceLabels.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/PolygonELement/components/DistanceLabels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA2B1B,UAAU,mBAAmB;IAC3B,WAAW,EAAE,MAAM,EAAE,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,QAAQ,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAC5C,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"DistanceLabels.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/PolygonELement/components/DistanceLabels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA2B1B,UAAU,mBAAmB;IAC3B,WAAW,EAAE,MAAM,EAAE,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,QAAQ,CAAC,EAAE;QAAE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,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+lCxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisionOffTransformWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/TransformWrapper/VisionOffTransformWrapper/VisionOffTransformWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAepD,UAAU,8BAA8B;IACtC,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE;QAC9B,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,IAAI,CAAC;IACX,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,gBAAgB,CAAC,EAAE;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,
|
|
1
|
+
{"version":3,"file":"VisionOffTransformWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/TransformWrapper/VisionOffTransformWrapper/VisionOffTransformWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAepD,UAAU,8BAA8B;IACtC,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE;QAC9B,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,IAAI,CAAC;IACX,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,gBAAgB,CAAC,EAAE;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAkXvE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/VisionOffElement/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAY9D,UAAU,qBAAqB;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,GAAI,oBAAoB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/VisionOffElement/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAY9D,UAAU,qBAAqB;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,GAAI,oBAAoB,qBAAqB,4CA0KlE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|