@fleet-frontend/mower-maps 0.2.0-beta.13 → 0.2.0-beta.14
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 +71 -90
- package/dist/index.js +71 -90
- 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,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5E,oBAAY,YAAY;IACtB,QAAQ,aAAa;IACr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AAC;IACzC,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CACvD;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,YAAY,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,GAAG,IAAI,CAAC;IAChF,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,kBAAkB,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAA;KAAE,EAAE,CAAC;IAC1D,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;CAU9B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;oBAEK,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;EACnE,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;oBAHH,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;EAGR,CAAC;AAE9D,eAAO,MAAM,iBAAiB,oBAAiD,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -15213,10 +15213,10 @@ const calculatePhysicalDistance$1 = (point1, point2) => {
|
|
|
15213
15213
|
const calculateMidpoint$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
|
|
|
@@ -15835,8 +15839,15 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
15835
15839
|
const { editMapInfo } = useMapEditContext();
|
|
15836
15840
|
const { platform } = useCommonContext();
|
|
15837
15841
|
// delete icon可能被上一个点遮挡,因为delete在右上方,所以手动处理点让点按照顺时针渲染,这样delete icon层级就会高一些
|
|
15842
|
+
// 禁区的点最后一个和第一个相同,会导致一个位置渲染两个点,需要额外处理下
|
|
15838
15843
|
const coordinates = useMemo(() => {
|
|
15839
|
-
|
|
15844
|
+
const temp = editMapInfo?.createMode === CreateStatus.CREATING ? points : [...points].reverse();
|
|
15845
|
+
const firstPoint = temp[0] || [];
|
|
15846
|
+
const lastPoint = temp[temp.length - 1] || [];
|
|
15847
|
+
if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1]) {
|
|
15848
|
+
return temp.slice(0, -1);
|
|
15849
|
+
}
|
|
15850
|
+
return temp;
|
|
15840
15851
|
}, [points, editMapInfo?.createMode]);
|
|
15841
15852
|
// 计算点到线段的垂足坐标(使用通用工具函数)
|
|
15842
15853
|
const calculatePerpendicularFoot$1 = useCallback((point, lineStart, lineEnd) => {
|
|
@@ -16350,7 +16361,7 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
16350
16361
|
const prevIndex = (dragState.dragIndex - 1 + coordinates.length) % coordinates.length;
|
|
16351
16362
|
const nextIndex = (dragState.dragIndex + 1) % coordinates.length;
|
|
16352
16363
|
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:
|
|
16364
|
+
})()] })), renderCoordinates.length >= 3 && (jsx("polygon", { className: styles$2.polygonPathG, points: polygonPoints, fill: fillColor, fillOpacity: fillOpacity, stroke: "none" // 边框透明
|
|
16354
16365
|
, onClick: onPolygonClick })), jsxs("g", { className: styles$2.polygonPathG, children: [renderCoordinates.length >= 2 &&
|
|
16355
16366
|
pathSegments.map((segment, index) => {
|
|
16356
16367
|
if (segment.points.length < 2)
|
|
@@ -16400,7 +16411,7 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
16400
16411
|
setHoverVertex(null);
|
|
16401
16412
|
},
|
|
16402
16413
|
}) }, `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)) &&
|
|
16414
|
+
}), 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
16415
|
renderCoordinates.map((coord, idx) => {
|
|
16405
16416
|
// 判断当前顶点的状态
|
|
16406
16417
|
const isLastPoint = idx === renderCoordinates.length - 1;
|
|
@@ -16562,7 +16573,7 @@ const BoundaryElement = ({ data }) => {
|
|
|
16562
16573
|
* 点击边界的回调
|
|
16563
16574
|
*/
|
|
16564
16575
|
const onPathClick = useCallback(() => {
|
|
16565
|
-
onSelectElement?.(DataType.BOUNDARY);
|
|
16576
|
+
onSelectElement?.(DataType.BOUNDARY, data);
|
|
16566
16577
|
if (platform === PlatformType.H5) {
|
|
16567
16578
|
// 对于地块来说,如果当前有元素是在编辑和创建模式下,则不进行选中
|
|
16568
16579
|
if (editMapInfo.mobileMode === MobileEditMode.EDIT ||
|
|
@@ -16595,9 +16606,7 @@ const BoundaryElement = ({ data }) => {
|
|
|
16595
16606
|
}
|
|
16596
16607
|
}, [platform, data, editMapInfo]);
|
|
16597
16608
|
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
|
-
}
|
|
16609
|
+
onPathClick();
|
|
16601
16610
|
}, onCoordinatesChange: (coordinates) => {
|
|
16602
16611
|
console.log('onCoordinatesChange', coordinates);
|
|
16603
16612
|
setEditMapInfo((prev) => ({
|
|
@@ -16714,7 +16723,7 @@ const useHistoryHandle = (props) => {
|
|
|
16714
16723
|
|
|
16715
16724
|
const ObstacleElement = ({ data }) => {
|
|
16716
16725
|
const style = data.style || {};
|
|
16717
|
-
const { editMapInfo, setEditMapInfo, onHandleEnterRecord } = useMapEditContext();
|
|
16726
|
+
const { editMapInfo, setEditMapInfo, onHandleEnterRecord, onSelectElement } = useMapEditContext();
|
|
16718
16727
|
const { platform } = useCommonContext();
|
|
16719
16728
|
const { disabledObstacles } = useSvgEditContext();
|
|
16720
16729
|
const { addHistory } = useHistoryHandle();
|
|
@@ -16759,6 +16768,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16759
16768
|
return dp2px(style.lineWidth || 3);
|
|
16760
16769
|
}, [platform, style, editMapInfo]);
|
|
16761
16770
|
const onPathClick = useCallback(() => {
|
|
16771
|
+
onSelectElement?.(DataType.OBSTACLE, data);
|
|
16762
16772
|
if (platform === PlatformType.H5) {
|
|
16763
16773
|
// h5编辑模式下,禁区只有在start模式下才需要选中
|
|
16764
16774
|
if (editMapInfo.mobileMode === MobileEditMode.EDIT ||
|
|
@@ -16779,27 +16789,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16779
16789
|
}));
|
|
16780
16790
|
}
|
|
16781
16791
|
}
|
|
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]);
|
|
16792
|
+
}, [data, editMapInfo, onSelectElement]);
|
|
16803
16793
|
const editMode = useMemo(() => {
|
|
16804
16794
|
if (platform === PlatformType.H5) {
|
|
16805
16795
|
return (editMapInfo?.mobileMode === MobileEditMode.EDIT &&
|
|
@@ -16808,10 +16798,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16808
16798
|
return editMapInfo?.selectElement?.id === data.id;
|
|
16809
16799
|
}, [editMapInfo, data, platform]);
|
|
16810
16800
|
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
|
-
}
|
|
16801
|
+
onPathClick();
|
|
16815
16802
|
}, onVertexDelete: (vertexIndex) => handleCreateVertexDelete(vertexIndex), onCoordinatesChange: (coordinates) => {
|
|
16816
16803
|
console.log('onCoordinatesChange', coordinates);
|
|
16817
16804
|
if (platform === PlatformType.H5 && editMapInfo.mobileMode === MobileEditMode.CREATE) {
|
|
@@ -17517,9 +17504,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
17517
17504
|
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
17505
|
onSelect?.();
|
|
17519
17506
|
}, onPolygonClick: () => {
|
|
17520
|
-
|
|
17521
|
-
onSelect?.();
|
|
17522
|
-
}
|
|
17507
|
+
onSelect?.();
|
|
17523
17508
|
} }), 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
17509
|
? {
|
|
17525
17510
|
onTouchStart: createReactEventHandler((e) => {
|
|
@@ -17601,7 +17586,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
17601
17586
|
};
|
|
17602
17587
|
|
|
17603
17588
|
const VisionOffElement = ({ data, onSelect }) => {
|
|
17604
|
-
const { setEditMapInfo, onHandleEnterRecord, editMapInfo } = useMapEditContext();
|
|
17589
|
+
const { setEditMapInfo, onHandleEnterRecord, editMapInfo, onSelectElement } = useMapEditContext();
|
|
17605
17590
|
const { addHistory } = useHistoryHandle();
|
|
17606
17591
|
const { platform } = useCommonContext();
|
|
17607
17592
|
const isSelected = useMemo(() => {
|
|
@@ -17614,6 +17599,7 @@ const VisionOffElement = ({ data, onSelect }) => {
|
|
|
17614
17599
|
return editMapInfo?.selectElement?.id === data.id;
|
|
17615
17600
|
}, [editMapInfo, data, platform]);
|
|
17616
17601
|
const handleSelect = useCallback(() => {
|
|
17602
|
+
onSelectElement?.(DataType.VISION_OFF, data);
|
|
17617
17603
|
if (platform === PlatformType.H5) {
|
|
17618
17604
|
// h5编辑模式下,
|
|
17619
17605
|
// start模式可以任意选
|
|
@@ -17648,26 +17634,26 @@ const VisionOffElement = ({ data, onSelect }) => {
|
|
|
17648
17634
|
}
|
|
17649
17635
|
if (editMapInfo?.selectElement)
|
|
17650
17636
|
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]);
|
|
17637
|
+
// return onHandleEnterRecord?.({
|
|
17638
|
+
// type: 2,
|
|
17639
|
+
// function: 1,
|
|
17640
|
+
// })?.then(() => {
|
|
17641
|
+
// onSelect?.();
|
|
17642
|
+
// setEditMapInfo((prev: EditMapInfo) => ({
|
|
17643
|
+
// ...prev,
|
|
17644
|
+
// selectElement: data,
|
|
17645
|
+
// elementType: DataType.VISION_OFF,
|
|
17646
|
+
// historyList: [
|
|
17647
|
+
// {
|
|
17648
|
+
// selectElement: data,
|
|
17649
|
+
// },
|
|
17650
|
+
// ],
|
|
17651
|
+
// currentHistoryIndex: 0,
|
|
17652
|
+
// editMap: true,
|
|
17653
|
+
// isShowDrag: true,
|
|
17654
|
+
// }));
|
|
17655
|
+
// });
|
|
17656
|
+
}, [data, onHandleEnterRecord, platform, editMapInfo, onSelectElement]);
|
|
17671
17657
|
const onCancel = useCallback(() => {
|
|
17672
17658
|
if (platform === PlatformType.H5) {
|
|
17673
17659
|
// 在h5中,这里的取消其实对应的是删除元素
|
|
@@ -18400,7 +18386,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
18400
18386
|
};
|
|
18401
18387
|
|
|
18402
18388
|
const DoodleElement = ({ data }) => {
|
|
18403
|
-
const { editMapInfo, setEditMapInfo,
|
|
18389
|
+
const { editMapInfo, setEditMapInfo, onHandleEvent, onSelectElement } = useMapEditContext();
|
|
18404
18390
|
const { addHistory } = useHistoryHandle();
|
|
18405
18391
|
const { platform, doodleList } = useCommonContext();
|
|
18406
18392
|
const isSelected = useMemo(() => {
|
|
@@ -18449,6 +18435,7 @@ const DoodleElement = ({ data }) => {
|
|
|
18449
18435
|
}, [data]);
|
|
18450
18436
|
const handleTransformChange = (transform) => { };
|
|
18451
18437
|
const handleSelect = useCallback(() => {
|
|
18438
|
+
onSelectElement?.(DataType.DOODLE, data);
|
|
18452
18439
|
if (platform === PlatformType.H5) {
|
|
18453
18440
|
// h5编辑模式下,
|
|
18454
18441
|
// 如果是创建,只能选择新建的doodle
|
|
@@ -18465,34 +18452,29 @@ const DoodleElement = ({ data }) => {
|
|
|
18465
18452
|
}));
|
|
18466
18453
|
return;
|
|
18467
18454
|
}
|
|
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]);
|
|
18455
|
+
// if (editMapInfo?.selectElement) {
|
|
18456
|
+
// return;
|
|
18457
|
+
// }
|
|
18458
|
+
// setEditMapInfo((prev: EditMapInfo) => ({
|
|
18459
|
+
// ...prev,
|
|
18460
|
+
// historyList: [
|
|
18461
|
+
// {
|
|
18462
|
+
// selectElement: {
|
|
18463
|
+
// ...data,
|
|
18464
|
+
// transformedPoints: transformedElements,
|
|
18465
|
+
// },
|
|
18466
|
+
// },
|
|
18467
|
+
// ],
|
|
18468
|
+
// currentHistoryIndex: 0,
|
|
18469
|
+
// selectElement: {
|
|
18470
|
+
// ...data,
|
|
18471
|
+
// transformedPoints: transformedElements,
|
|
18472
|
+
// },
|
|
18473
|
+
// elementType: DataType.DOODLE,
|
|
18474
|
+
// editMap: true,
|
|
18475
|
+
// isShowDrag: true,
|
|
18476
|
+
// }));
|
|
18477
|
+
}, [data, platform, editMapInfo, onSelectElement]);
|
|
18496
18478
|
const handleCancel = useCallback(() => {
|
|
18497
18479
|
if (platform === PlatformType.H5) {
|
|
18498
18480
|
setEditMapInfo((prev) => ({
|
|
@@ -18542,7 +18524,6 @@ const DoodleElement = ({ data }) => {
|
|
|
18542
18524
|
},
|
|
18543
18525
|
});
|
|
18544
18526
|
}, [transformedElements]);
|
|
18545
|
-
console.log('isSelectedWithoutOperation--->', editMapInfo, isSelectedWithoutOperation, isSelected);
|
|
18546
18527
|
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
18528
|
};
|
|
18548
18529
|
|
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
|
|
|
@@ -15855,8 +15859,15 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
15855
15859
|
const { editMapInfo } = useMapEditContext();
|
|
15856
15860
|
const { platform } = useCommonContext();
|
|
15857
15861
|
// delete icon可能被上一个点遮挡,因为delete在右上方,所以手动处理点让点按照顺时针渲染,这样delete icon层级就会高一些
|
|
15862
|
+
// 禁区的点最后一个和第一个相同,会导致一个位置渲染两个点,需要额外处理下
|
|
15858
15863
|
const coordinates = React.useMemo(() => {
|
|
15859
|
-
|
|
15864
|
+
const temp = editMapInfo?.createMode === exports.CreateStatus.CREATING ? points : [...points].reverse();
|
|
15865
|
+
const firstPoint = temp[0] || [];
|
|
15866
|
+
const lastPoint = temp[temp.length - 1] || [];
|
|
15867
|
+
if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1]) {
|
|
15868
|
+
return temp.slice(0, -1);
|
|
15869
|
+
}
|
|
15870
|
+
return temp;
|
|
15860
15871
|
}, [points, editMapInfo?.createMode]);
|
|
15861
15872
|
// 计算点到线段的垂足坐标(使用通用工具函数)
|
|
15862
15873
|
const calculatePerpendicularFoot$1 = React.useCallback((point, lineStart, lineEnd) => {
|
|
@@ -16370,7 +16381,7 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
16370
16381
|
const prevIndex = (dragState.dragIndex - 1 + coordinates.length) % coordinates.length;
|
|
16371
16382
|
const nextIndex = (dragState.dragIndex + 1) % coordinates.length;
|
|
16372
16383
|
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:
|
|
16384
|
+
})()] })), renderCoordinates.length >= 3 && (jsxRuntime.jsx("polygon", { className: styles$2.polygonPathG, points: polygonPoints, fill: fillColor, fillOpacity: fillOpacity, stroke: "none" // 边框透明
|
|
16374
16385
|
, onClick: onPolygonClick })), jsxRuntime.jsxs("g", { className: styles$2.polygonPathG, children: [renderCoordinates.length >= 2 &&
|
|
16375
16386
|
pathSegments.map((segment, index) => {
|
|
16376
16387
|
if (segment.points.length < 2)
|
|
@@ -16420,7 +16431,7 @@ const PolygonElement = ({ points, fillColor = 'rgba(0, 0, 0, 0.1)', fillOpacity
|
|
|
16420
16431
|
setHoverVertex(null);
|
|
16421
16432
|
},
|
|
16422
16433
|
}) }, `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)) &&
|
|
16434
|
+
}), 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
16435
|
renderCoordinates.map((coord, idx) => {
|
|
16425
16436
|
// 判断当前顶点的状态
|
|
16426
16437
|
const isLastPoint = idx === renderCoordinates.length - 1;
|
|
@@ -16582,7 +16593,7 @@ const BoundaryElement = ({ data }) => {
|
|
|
16582
16593
|
* 点击边界的回调
|
|
16583
16594
|
*/
|
|
16584
16595
|
const onPathClick = React.useCallback(() => {
|
|
16585
|
-
onSelectElement?.(exports.DataType.BOUNDARY);
|
|
16596
|
+
onSelectElement?.(exports.DataType.BOUNDARY, data);
|
|
16586
16597
|
if (platform === exports.PlatformType.H5) {
|
|
16587
16598
|
// 对于地块来说,如果当前有元素是在编辑和创建模式下,则不进行选中
|
|
16588
16599
|
if (editMapInfo.mobileMode === exports.MobileEditMode.EDIT ||
|
|
@@ -16615,9 +16626,7 @@ const BoundaryElement = ({ data }) => {
|
|
|
16615
16626
|
}
|
|
16616
16627
|
}, [platform, data, editMapInfo]);
|
|
16617
16628
|
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
|
-
}
|
|
16629
|
+
onPathClick();
|
|
16621
16630
|
}, onCoordinatesChange: (coordinates) => {
|
|
16622
16631
|
console.log('onCoordinatesChange', coordinates);
|
|
16623
16632
|
setEditMapInfo((prev) => ({
|
|
@@ -16734,7 +16743,7 @@ const useHistoryHandle = (props) => {
|
|
|
16734
16743
|
|
|
16735
16744
|
const ObstacleElement = ({ data }) => {
|
|
16736
16745
|
const style = data.style || {};
|
|
16737
|
-
const { editMapInfo, setEditMapInfo, onHandleEnterRecord } = useMapEditContext();
|
|
16746
|
+
const { editMapInfo, setEditMapInfo, onHandleEnterRecord, onSelectElement } = useMapEditContext();
|
|
16738
16747
|
const { platform } = useCommonContext();
|
|
16739
16748
|
const { disabledObstacles } = useSvgEditContext();
|
|
16740
16749
|
const { addHistory } = useHistoryHandle();
|
|
@@ -16779,6 +16788,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16779
16788
|
return dp2px(style.lineWidth || 3);
|
|
16780
16789
|
}, [platform, style, editMapInfo]);
|
|
16781
16790
|
const onPathClick = React.useCallback(() => {
|
|
16791
|
+
onSelectElement?.(exports.DataType.OBSTACLE, data);
|
|
16782
16792
|
if (platform === exports.PlatformType.H5) {
|
|
16783
16793
|
// h5编辑模式下,禁区只有在start模式下才需要选中
|
|
16784
16794
|
if (editMapInfo.mobileMode === exports.MobileEditMode.EDIT ||
|
|
@@ -16799,27 +16809,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16799
16809
|
}));
|
|
16800
16810
|
}
|
|
16801
16811
|
}
|
|
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]);
|
|
16812
|
+
}, [data, editMapInfo, onSelectElement]);
|
|
16823
16813
|
const editMode = React.useMemo(() => {
|
|
16824
16814
|
if (platform === exports.PlatformType.H5) {
|
|
16825
16815
|
return (editMapInfo?.mobileMode === exports.MobileEditMode.EDIT &&
|
|
@@ -16828,10 +16818,7 @@ const ObstacleElement = ({ data }) => {
|
|
|
16828
16818
|
return editMapInfo?.selectElement?.id === data.id;
|
|
16829
16819
|
}, [editMapInfo, data, platform]);
|
|
16830
16820
|
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
|
-
}
|
|
16821
|
+
onPathClick();
|
|
16835
16822
|
}, onVertexDelete: (vertexIndex) => handleCreateVertexDelete(vertexIndex), onCoordinatesChange: (coordinates) => {
|
|
16836
16823
|
console.log('onCoordinatesChange', coordinates);
|
|
16837
16824
|
if (platform === exports.PlatformType.H5 && editMapInfo.mobileMode === exports.MobileEditMode.CREATE) {
|
|
@@ -17537,9 +17524,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
17537
17524
|
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
17525
|
onSelect?.();
|
|
17539
17526
|
}, onPolygonClick: () => {
|
|
17540
|
-
|
|
17541
|
-
onSelect?.();
|
|
17542
|
-
}
|
|
17527
|
+
onSelect?.();
|
|
17543
17528
|
} }), 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
17529
|
? {
|
|
17545
17530
|
onTouchStart: createReactEventHandler((e) => {
|
|
@@ -17621,7 +17606,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
17621
17606
|
};
|
|
17622
17607
|
|
|
17623
17608
|
const VisionOffElement = ({ data, onSelect }) => {
|
|
17624
|
-
const { setEditMapInfo, onHandleEnterRecord, editMapInfo } = useMapEditContext();
|
|
17609
|
+
const { setEditMapInfo, onHandleEnterRecord, editMapInfo, onSelectElement } = useMapEditContext();
|
|
17625
17610
|
const { addHistory } = useHistoryHandle();
|
|
17626
17611
|
const { platform } = useCommonContext();
|
|
17627
17612
|
const isSelected = React.useMemo(() => {
|
|
@@ -17634,6 +17619,7 @@ const VisionOffElement = ({ data, onSelect }) => {
|
|
|
17634
17619
|
return editMapInfo?.selectElement?.id === data.id;
|
|
17635
17620
|
}, [editMapInfo, data, platform]);
|
|
17636
17621
|
const handleSelect = React.useCallback(() => {
|
|
17622
|
+
onSelectElement?.(exports.DataType.VISION_OFF, data);
|
|
17637
17623
|
if (platform === exports.PlatformType.H5) {
|
|
17638
17624
|
// h5编辑模式下,
|
|
17639
17625
|
// start模式可以任意选
|
|
@@ -17668,26 +17654,26 @@ const VisionOffElement = ({ data, onSelect }) => {
|
|
|
17668
17654
|
}
|
|
17669
17655
|
if (editMapInfo?.selectElement)
|
|
17670
17656
|
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]);
|
|
17657
|
+
// return onHandleEnterRecord?.({
|
|
17658
|
+
// type: 2,
|
|
17659
|
+
// function: 1,
|
|
17660
|
+
// })?.then(() => {
|
|
17661
|
+
// onSelect?.();
|
|
17662
|
+
// setEditMapInfo((prev: EditMapInfo) => ({
|
|
17663
|
+
// ...prev,
|
|
17664
|
+
// selectElement: data,
|
|
17665
|
+
// elementType: DataType.VISION_OFF,
|
|
17666
|
+
// historyList: [
|
|
17667
|
+
// {
|
|
17668
|
+
// selectElement: data,
|
|
17669
|
+
// },
|
|
17670
|
+
// ],
|
|
17671
|
+
// currentHistoryIndex: 0,
|
|
17672
|
+
// editMap: true,
|
|
17673
|
+
// isShowDrag: true,
|
|
17674
|
+
// }));
|
|
17675
|
+
// });
|
|
17676
|
+
}, [data, onHandleEnterRecord, platform, editMapInfo, onSelectElement]);
|
|
17691
17677
|
const onCancel = React.useCallback(() => {
|
|
17692
17678
|
if (platform === exports.PlatformType.H5) {
|
|
17693
17679
|
// 在h5中,这里的取消其实对应的是删除元素
|
|
@@ -18420,7 +18406,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
18420
18406
|
};
|
|
18421
18407
|
|
|
18422
18408
|
const DoodleElement = ({ data }) => {
|
|
18423
|
-
const { editMapInfo, setEditMapInfo,
|
|
18409
|
+
const { editMapInfo, setEditMapInfo, onHandleEvent, onSelectElement } = useMapEditContext();
|
|
18424
18410
|
const { addHistory } = useHistoryHandle();
|
|
18425
18411
|
const { platform, doodleList } = useCommonContext();
|
|
18426
18412
|
const isSelected = React.useMemo(() => {
|
|
@@ -18469,6 +18455,7 @@ const DoodleElement = ({ data }) => {
|
|
|
18469
18455
|
}, [data]);
|
|
18470
18456
|
const handleTransformChange = (transform) => { };
|
|
18471
18457
|
const handleSelect = React.useCallback(() => {
|
|
18458
|
+
onSelectElement?.(exports.DataType.DOODLE, data);
|
|
18472
18459
|
if (platform === exports.PlatformType.H5) {
|
|
18473
18460
|
// h5编辑模式下,
|
|
18474
18461
|
// 如果是创建,只能选择新建的doodle
|
|
@@ -18485,34 +18472,29 @@ const DoodleElement = ({ data }) => {
|
|
|
18485
18472
|
}));
|
|
18486
18473
|
return;
|
|
18487
18474
|
}
|
|
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]);
|
|
18475
|
+
// if (editMapInfo?.selectElement) {
|
|
18476
|
+
// return;
|
|
18477
|
+
// }
|
|
18478
|
+
// setEditMapInfo((prev: EditMapInfo) => ({
|
|
18479
|
+
// ...prev,
|
|
18480
|
+
// historyList: [
|
|
18481
|
+
// {
|
|
18482
|
+
// selectElement: {
|
|
18483
|
+
// ...data,
|
|
18484
|
+
// transformedPoints: transformedElements,
|
|
18485
|
+
// },
|
|
18486
|
+
// },
|
|
18487
|
+
// ],
|
|
18488
|
+
// currentHistoryIndex: 0,
|
|
18489
|
+
// selectElement: {
|
|
18490
|
+
// ...data,
|
|
18491
|
+
// transformedPoints: transformedElements,
|
|
18492
|
+
// },
|
|
18493
|
+
// elementType: DataType.DOODLE,
|
|
18494
|
+
// editMap: true,
|
|
18495
|
+
// isShowDrag: true,
|
|
18496
|
+
// }));
|
|
18497
|
+
}, [data, platform, editMapInfo, onSelectElement]);
|
|
18516
18498
|
const handleCancel = React.useCallback(() => {
|
|
18517
18499
|
if (platform === exports.PlatformType.H5) {
|
|
18518
18500
|
setEditMapInfo((prev) => ({
|
|
@@ -18562,7 +18544,6 @@ const DoodleElement = ({ data }) => {
|
|
|
18562
18544
|
},
|
|
18563
18545
|
});
|
|
18564
18546
|
}, [transformedElements]);
|
|
18565
|
-
console.log('isSelectedWithoutOperation--->', editMapInfo, isSelectedWithoutOperation, isSelected);
|
|
18566
18547
|
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
18548
|
};
|
|
18568
18549
|
|
|
@@ -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,4CAoFtD,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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,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC7D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAE3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,IAAI,CAAC;IACxD,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAE/C,SAAS,CAAC,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"}
|