@fleet-frontend/mower-maps 0.2.5-beta.6 → 0.2.5-beta.7
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/config/constants.d.ts +3 -3
- package/dist/index.esm.js +186 -43
- package/dist/index.js +185 -42
- package/dist/processor/unified/BaseData.d.ts +0 -1
- package/dist/processor/unified/BaseData.d.ts.map +1 -1
- package/dist/render/svgElement/PolygonELement/components/Tooltip.d.ts +12 -0
- package/dist/render/svgElement/PolygonELement/components/Tooltip.d.ts.map +1 -0
- package/dist/render/svgElement/PolygonELement/index.d.ts.map +1 -1
- package/dist/render/svgElement/TransformWrapper/DoodleTransformWrapper/DoodleTransformWrapper.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -13,13 +13,13 @@ export declare const SCALE_FACTOR = 50;
|
|
|
13
13
|
* 默认线宽设置
|
|
14
14
|
*/
|
|
15
15
|
export declare const DEFAULT_LINE_WIDTHS: {
|
|
16
|
-
readonly BOUNDARY:
|
|
17
|
-
readonly OBSTACLE:
|
|
16
|
+
readonly BOUNDARY: 2;
|
|
17
|
+
readonly OBSTACLE: 2;
|
|
18
18
|
readonly CHARGING_PILE: 3;
|
|
19
19
|
readonly CHANNEL: 3;
|
|
20
20
|
readonly PATH: 20;
|
|
21
21
|
readonly PATH_TRANS: 6;
|
|
22
|
-
readonly VISION_OFF_AREA:
|
|
22
|
+
readonly VISION_OFF_AREA: 2;
|
|
23
23
|
readonly TUNNEL: 3;
|
|
24
24
|
readonly TIME_LIMIT_OBSTACLE: 1;
|
|
25
25
|
};
|
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { memo, useMemo, useEffect, useState, useRef, useCallback, createContext, useContext, useLayoutEffect, forwardRef, useImperativeHandle } from 'react';
|
|
4
|
-
import ReactDOM from 'react-dom';
|
|
4
|
+
import ReactDOM, { createPortal } from 'react-dom';
|
|
5
5
|
|
|
6
6
|
function globals (defs) {
|
|
7
7
|
defs('EPSG:4326', '+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees');
|
|
@@ -10625,12 +10625,12 @@ const SCALE_FACTOR = 50; // 50像素/米
|
|
|
10625
10625
|
* 默认线宽设置
|
|
10626
10626
|
*/
|
|
10627
10627
|
const DEFAULT_LINE_WIDTHS = {
|
|
10628
|
-
BOUNDARY:
|
|
10629
|
-
OBSTACLE:
|
|
10628
|
+
BOUNDARY: 2,
|
|
10629
|
+
OBSTACLE: 2,
|
|
10630
10630
|
CHARGING_PILE: 3,
|
|
10631
10631
|
CHANNEL: 3,
|
|
10632
10632
|
PATH: 20,
|
|
10633
|
-
VISION_OFF_AREA:
|
|
10633
|
+
VISION_OFF_AREA: 2,
|
|
10634
10634
|
TIME_LIMIT_OBSTACLE: 1,
|
|
10635
10635
|
};
|
|
10636
10636
|
/**
|
|
@@ -13709,7 +13709,6 @@ class BaseData {
|
|
|
13709
13709
|
else {
|
|
13710
13710
|
this.computedArea = 0;
|
|
13711
13711
|
}
|
|
13712
|
-
this.canEdit = false;
|
|
13713
13712
|
}
|
|
13714
13713
|
}
|
|
13715
13714
|
/**
|
|
@@ -13732,7 +13731,6 @@ class BoundaryData extends BaseData {
|
|
|
13732
13731
|
this.recBaseAngle = originalData?.rec_base_angle;
|
|
13733
13732
|
this.channels = channels;
|
|
13734
13733
|
this.style = style;
|
|
13735
|
-
this.canEdit = true;
|
|
13736
13734
|
}
|
|
13737
13735
|
}
|
|
13738
13736
|
/**
|
|
@@ -13760,7 +13758,6 @@ class ObstacleData extends BaseData {
|
|
|
13760
13758
|
this.end_timestamp = originalData?.end_timestamp;
|
|
13761
13759
|
this.name = originalData?.name || 'Noname';
|
|
13762
13760
|
this.style = style;
|
|
13763
|
-
this.canEdit = true;
|
|
13764
13761
|
}
|
|
13765
13762
|
}
|
|
13766
13763
|
/**
|
|
@@ -13788,7 +13785,6 @@ class DoodleData extends BaseData {
|
|
|
13788
13785
|
this.style = style;
|
|
13789
13786
|
this.create_ts = originalData?.create_ts || Date.now();
|
|
13790
13787
|
this.expiration_ts = originalData?.expiration_ts || Date.now() + 3600000;
|
|
13791
|
-
this.canEdit = true;
|
|
13792
13788
|
this.computedArea = this.getDoodleComputedArea();
|
|
13793
13789
|
}
|
|
13794
13790
|
getDoodleComputedArea() {
|
|
@@ -13805,7 +13801,6 @@ class VisionOffData extends BaseData {
|
|
|
13805
13801
|
const convertedPoints = convertPointsFormat(originalData?.points) || [];
|
|
13806
13802
|
super(originalData?.id, DataType.VISION_OFF, level, RenderType.POLYGON, convertedPoints, originalData);
|
|
13807
13803
|
this.style = style;
|
|
13808
|
-
this.canEdit = true;
|
|
13809
13804
|
}
|
|
13810
13805
|
}
|
|
13811
13806
|
/**
|
|
@@ -22908,9 +22903,9 @@ const VertexElement = React__default.memo(({ r, stroke, fill, ...props }) => {
|
|
|
22908
22903
|
});
|
|
22909
22904
|
|
|
22910
22905
|
var _path$1;
|
|
22911
|
-
function _extends$
|
|
22906
|
+
function _extends$8() { return _extends$8 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$8.apply(null, arguments); }
|
|
22912
22907
|
var SvgDelete = function SvgDelete(props) {
|
|
22913
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22908
|
+
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
|
22914
22909
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22915
22910
|
width: 16,
|
|
22916
22911
|
height: 16,
|
|
@@ -23567,6 +23562,34 @@ const useCheckElement = () => {
|
|
|
23567
23562
|
};
|
|
23568
23563
|
};
|
|
23569
23564
|
|
|
23565
|
+
const Tooltip = ({ open, x, y, text, style, onClick }) => {
|
|
23566
|
+
if (!open)
|
|
23567
|
+
return null;
|
|
23568
|
+
const tooltipStyle = {
|
|
23569
|
+
position: 'fixed',
|
|
23570
|
+
left: x,
|
|
23571
|
+
top: y,
|
|
23572
|
+
backgroundColor: '#fff',
|
|
23573
|
+
borderRadius: '4px',
|
|
23574
|
+
height: '20px',
|
|
23575
|
+
lineHeight: '16px',
|
|
23576
|
+
fontSize: '12px',
|
|
23577
|
+
color: '#211F1F',
|
|
23578
|
+
padding: '2px 4px',
|
|
23579
|
+
whiteSpace: 'nowrap',
|
|
23580
|
+
zIndex: 9999,
|
|
23581
|
+
cursor: 'pointer',
|
|
23582
|
+
userSelect: 'none',
|
|
23583
|
+
...style,
|
|
23584
|
+
};
|
|
23585
|
+
// 使用 createPortal 挂载到 body
|
|
23586
|
+
return createPortal(jsx("div", { style: tooltipStyle, onClick: (e) => {
|
|
23587
|
+
e.preventDefault();
|
|
23588
|
+
e.stopPropagation();
|
|
23589
|
+
onClick?.();
|
|
23590
|
+
}, children: text }), document.body);
|
|
23591
|
+
};
|
|
23592
|
+
|
|
23570
23593
|
/**
|
|
23571
23594
|
* 将坐标点数组转换为polygon points字符串
|
|
23572
23595
|
* @param coordinates 坐标点数组 [[x1, y1], [x2, y2], ...]
|
|
@@ -23705,6 +23728,15 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
23705
23728
|
}, [svgRef]);
|
|
23706
23729
|
// 删除确认 Tooltip 状态
|
|
23707
23730
|
const [tooltipIndex, setTooltipIndex] = useState(null);
|
|
23731
|
+
const [tooltipPos, setTooltipPos] = useState({ x: 0, y: 0 });
|
|
23732
|
+
const [completeTooltipOpen, setCompleteTooltipOpen] = useState(false);
|
|
23733
|
+
const updateTooltipPos = (target) => {
|
|
23734
|
+
const rect = target.getBoundingClientRect();
|
|
23735
|
+
setTooltipPos({
|
|
23736
|
+
x: rect.left + rect.width + 4,
|
|
23737
|
+
y: rect.top - 10
|
|
23738
|
+
});
|
|
23739
|
+
};
|
|
23708
23740
|
// 处理顶点点击(仅透出点击;不触发删除)
|
|
23709
23741
|
const handleVertexClick = useCallback((e, index) => {
|
|
23710
23742
|
// 阻止事件冒泡到Google Maps
|
|
@@ -23719,6 +23751,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
23719
23751
|
window.clearTimeout(clickTimerRef.current);
|
|
23720
23752
|
}
|
|
23721
23753
|
clickTimerRef.current = window.setTimeout(() => {
|
|
23754
|
+
setCompleteTooltipOpen(false);
|
|
23722
23755
|
// 创建模式下点击顶点回调(仅透出点击)
|
|
23723
23756
|
if (onPointClick) {
|
|
23724
23757
|
onPointClick(index, e);
|
|
@@ -24242,12 +24275,17 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24242
24275
|
if (isDash && showStraddleBoundaryBorder) {
|
|
24243
24276
|
return (jsx(DashPath, { className: canSelect ? styles$6.polygonPath : '', points: segment.points, stroke: strokeColor, strokeWidth: isHover ? strokeWidth + 1 : strokeWidth, strokeOpacity: strokeOpacity }, index));
|
|
24244
24277
|
}
|
|
24245
|
-
return (jsx("path", { d: pathData, fill: "none", stroke:
|
|
24246
|
-
|
|
24247
|
-
|
|
24248
|
-
|
|
24249
|
-
|
|
24250
|
-
|
|
24278
|
+
return (jsxs(Fragment, { children: [(editMode || createMode) && (jsx("path", { d: pathData, fill: "none", stroke: '#fff', strokeWidth: strokeWidth * 2, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke", style: {
|
|
24279
|
+
userSelect: 'none',
|
|
24280
|
+
WebkitUserSelect: 'none',
|
|
24281
|
+
WebkitTouchCallout: 'none',
|
|
24282
|
+
touchAction: 'none',
|
|
24283
|
+
} }, 'warp' + index)), jsx("path", { d: pathData, fill: "none", stroke: strokeColor, strokeWidth: isHover ? strokeWidth + 1 : strokeWidth, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", className: canSelect ? styles$6.polygonPath : '', vectorEffect: "non-scaling-stroke", onClick: onPathClick, style: {
|
|
24284
|
+
userSelect: 'none',
|
|
24285
|
+
WebkitUserSelect: 'none',
|
|
24286
|
+
WebkitTouchCallout: 'none',
|
|
24287
|
+
touchAction: 'none',
|
|
24288
|
+
} }, index)] }));
|
|
24251
24289
|
}) }), (editMode || (createMode && completed)) &&
|
|
24252
24290
|
renderCoordinates.length >= 2 &&
|
|
24253
24291
|
renderCoordinates.map((coord, index) => {
|
|
@@ -24285,7 +24323,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24285
24323
|
setHoverVertex(null);
|
|
24286
24324
|
},
|
|
24287
24325
|
}) }, `edge-${index}`));
|
|
24288
|
-
}), 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 * 1.5 : 30 * overlayScale, unitType: unitType }), 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 * 1.5 : 30 * overlayScale, showFirstDistance: platform !== PlatformType.H5, unit: unitType }), 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)) &&
|
|
24326
|
+
}), ghostLastPath && (jsxs(Fragment, { children: [jsx("path", { d: ghostLastPath, stroke: '#fff', strokeWidth: strokeWidth * 2, vectorEffect: "non-scaling-stroke", opacity: 0.7 }), jsx("path", { d: ghostLastPath, stroke: strokeColor, strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", opacity: 0.7, onClick: onPathClick })] })), ghostFirstPath && renderCoordinates.length >= 2 && (jsxs(Fragment, { children: [jsx("path", { d: ghostFirstPath, stroke: '#fff', strokeWidth: strokeWidth * 2, vectorEffect: "non-scaling-stroke", opacity: 0.7 }), 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 * 1.5 : 30 * overlayScale, unitType: unitType }), 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 * 1.5 : 30 * overlayScale, showFirstDistance: platform !== PlatformType.H5, unit: unitType }), 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)) &&
|
|
24289
24327
|
renderCoordinates.map((coord, idx) => {
|
|
24290
24328
|
// 判断当前顶点的状态
|
|
24291
24329
|
const isLastPoint = idx === renderCoordinates.length - 1;
|
|
@@ -24325,6 +24363,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24325
24363
|
}, 300);
|
|
24326
24364
|
// 打开删除确认 Tooltip(仅在可编辑时)
|
|
24327
24365
|
if (editMode || (createMode && completed)) {
|
|
24366
|
+
updateTooltipPos(e.target);
|
|
24328
24367
|
setTooltipIndex(idx);
|
|
24329
24368
|
}
|
|
24330
24369
|
}, ...(platform === PlatformType.H5
|
|
@@ -24400,7 +24439,14 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24400
24439
|
}
|
|
24401
24440
|
}
|
|
24402
24441
|
},
|
|
24403
|
-
|
|
24442
|
+
onMouseEnter: canComplete ? (e) => {
|
|
24443
|
+
setCompleteTooltipOpen(true);
|
|
24444
|
+
updateTooltipPos(e.target);
|
|
24445
|
+
} : undefined,
|
|
24446
|
+
onMouseLeave: canComplete ? () => {
|
|
24447
|
+
setCompleteTooltipOpen(false);
|
|
24448
|
+
} : undefined,
|
|
24449
|
+
}) }), platform === PlatformType.H5 && tooltipIndex === idx && coordinates.length > 3 && (jsxs("g", { transform: `translate(${coord[0] + 4 * overlayScale * 2}, ${coord[1] - 4 * overlayScale * 2}) scale(${overlayScale * 2})`, onClick: (e) => {
|
|
24404
24450
|
e.preventDefault();
|
|
24405
24451
|
e.stopPropagation();
|
|
24406
24452
|
if (onVertexDelete &&
|
|
@@ -24423,7 +24469,12 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24423
24469
|
// >
|
|
24424
24470
|
// </rect>
|
|
24425
24471
|
)] }, `vertex-${idx}`));
|
|
24426
|
-
})
|
|
24472
|
+
}), platform === PlatformType.WEB && tooltipIndex !== null && (jsx(Tooltip, { open: true, x: tooltipPos.x, y: tooltipPos.y, text: "Remove", onClick: () => {
|
|
24473
|
+
if (onVertexDelete && (editMode || (createMode && completed)) && coordinates.length > 3) {
|
|
24474
|
+
onVertexDelete(renderCoordinates?.length - 1 - tooltipIndex);
|
|
24475
|
+
}
|
|
24476
|
+
setTooltipIndex(null);
|
|
24477
|
+
} })), platform === PlatformType.WEB && completeTooltipOpen && (jsx(Tooltip, { open: true, x: tooltipPos.x, y: tooltipPos.y, text: "Click to finish" }))] }));
|
|
24427
24478
|
};
|
|
24428
24479
|
|
|
24429
24480
|
const MowPartitionContext = createContext({
|
|
@@ -25102,15 +25153,15 @@ const useVisionOffTransform = (data, scaleConstraints
|
|
|
25102
25153
|
};
|
|
25103
25154
|
};
|
|
25104
25155
|
|
|
25105
|
-
var _g$
|
|
25106
|
-
function _extends$
|
|
25156
|
+
var _g$6, _defs$6;
|
|
25157
|
+
function _extends$7() { return _extends$7 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$7.apply(null, arguments); }
|
|
25107
25158
|
var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
25108
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
25159
|
+
return /*#__PURE__*/React.createElement("svg", _extends$7({
|
|
25109
25160
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25110
25161
|
width: 20,
|
|
25111
25162
|
height: 20,
|
|
25112
25163
|
fill: "none"
|
|
25113
|
-
}, props), _g$
|
|
25164
|
+
}, props), _g$6 || (_g$6 = /*#__PURE__*/React.createElement("g", {
|
|
25114
25165
|
clipPath: "url(#transform-delete_svg__a)"
|
|
25115
25166
|
}, /*#__PURE__*/React.createElement("circle", {
|
|
25116
25167
|
cx: 10,
|
|
@@ -25133,7 +25184,7 @@ var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
|
25133
25184
|
fill: "#fff",
|
|
25134
25185
|
rx: 0.8,
|
|
25135
25186
|
transform: "rotate(45 6.323 5.191)"
|
|
25136
|
-
}))), _defs$
|
|
25187
|
+
}))), _defs$6 || (_defs$6 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
25137
25188
|
id: "transform-delete_svg__b",
|
|
25138
25189
|
x1: 17.727,
|
|
25139
25190
|
x2: -1.215,
|
|
@@ -25153,15 +25204,15 @@ var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
|
25153
25204
|
})))));
|
|
25154
25205
|
};
|
|
25155
25206
|
|
|
25156
|
-
var _g$
|
|
25157
|
-
function _extends$
|
|
25207
|
+
var _g$5, _defs$5;
|
|
25208
|
+
function _extends$6() { return _extends$6 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$6.apply(null, arguments); }
|
|
25158
25209
|
var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
25159
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
25210
|
+
return /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
25160
25211
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25161
25212
|
width: 21,
|
|
25162
25213
|
height: 20,
|
|
25163
25214
|
fill: "none"
|
|
25164
|
-
}, props), _g$
|
|
25215
|
+
}, props), _g$5 || (_g$5 = /*#__PURE__*/React.createElement("g", {
|
|
25165
25216
|
clipPath: "url(#transform-rotate_svg__a)"
|
|
25166
25217
|
}, /*#__PURE__*/React.createElement("path", {
|
|
25167
25218
|
fill: "url(#transform-rotate_svg__b)",
|
|
@@ -25169,7 +25220,7 @@ var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
|
25169
25220
|
}), /*#__PURE__*/React.createElement("path", {
|
|
25170
25221
|
fill: "#fff",
|
|
25171
25222
|
d: "M11.602 14.719a5.447 5.447 0 0 1-6.608-5.116l-.004-.205a.818.818 0 0 1 1.633-.084l.004.084.01.285a3.81 3.81 0 0 0 2.127 3.137l.26.115a3.8 3.8 0 0 0 2.227.184l.276-.071q.29-.088.561-.219l-1.147-.441a.817.817 0 0 1 .587-1.525l2.54.977a.817.817 0 0 1 .316 1.308l.001.001a5.45 5.45 0 0 1-2.783 1.57M8.623 4.548a5.447 5.447 0 0 1 6.608 5.116l.004.204a.818.818 0 0 1-1.633.084l-.004-.084-.01-.284a3.81 3.81 0 0 0-2.127-3.138l-.26-.115a3.8 3.8 0 0 0-2.227-.184l-.276.072q-.29.087-.561.218l1.147.442a.817.817 0 0 1-.586 1.524l-2.542-.976a.817.817 0 0 1-.315-1.309 5.45 5.45 0 0 1 2.782-1.57"
|
|
25172
|
-
}))), _defs$
|
|
25223
|
+
}))), _defs$5 || (_defs$5 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
25173
25224
|
id: "transform-rotate_svg__b",
|
|
25174
25225
|
x1: 17.84,
|
|
25175
25226
|
x2: -1.103,
|
|
@@ -25189,15 +25240,15 @@ var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
|
25189
25240
|
})))));
|
|
25190
25241
|
};
|
|
25191
25242
|
|
|
25192
|
-
var _g$
|
|
25193
|
-
function _extends$
|
|
25243
|
+
var _g$4, _defs$4;
|
|
25244
|
+
function _extends$5() { return _extends$5 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$5.apply(null, arguments); }
|
|
25194
25245
|
var SvgTransformScale = function SvgTransformScale(props) {
|
|
25195
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
25246
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5({
|
|
25196
25247
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25197
25248
|
width: 21,
|
|
25198
25249
|
height: 20,
|
|
25199
25250
|
fill: "none"
|
|
25200
|
-
}, props), _g$
|
|
25251
|
+
}, props), _g$4 || (_g$4 = /*#__PURE__*/React.createElement("g", {
|
|
25201
25252
|
clipPath: "url(#transform-scale_svg__a)"
|
|
25202
25253
|
}, /*#__PURE__*/React.createElement("path", {
|
|
25203
25254
|
fill: "url(#transform-scale_svg__b)",
|
|
@@ -25205,7 +25256,7 @@ var SvgTransformScale = function SvgTransformScale(props) {
|
|
|
25205
25256
|
}), /*#__PURE__*/React.createElement("path", {
|
|
25206
25257
|
fill: "#fff",
|
|
25207
25258
|
d: "M5.078 8.265a.8.8 0 0 0 1.6.001v-.544l5.69 5.69h-.494a.8.8 0 0 0 0 1.6l2.474-.002a.8.8 0 0 0 .311-.062.8.8 0 0 0 .49-.738v-2.474a.8.8 0 1 0-1.6 0v.594L7.81 6.59h.544a.8.8 0 0 0 0-1.6H5.879a.8.8 0 0 0-.8.8z"
|
|
25208
|
-
}))), _defs$
|
|
25259
|
+
}))), _defs$4 || (_defs$4 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
25209
25260
|
id: "transform-scale_svg__b",
|
|
25210
25261
|
x1: 17.84,
|
|
25211
25262
|
x2: -1.103,
|
|
@@ -25225,15 +25276,15 @@ var SvgTransformScale = function SvgTransformScale(props) {
|
|
|
25225
25276
|
})))));
|
|
25226
25277
|
};
|
|
25227
25278
|
|
|
25228
|
-
var _g, _defs;
|
|
25229
|
-
function _extends$
|
|
25279
|
+
var _g$3, _defs$3;
|
|
25280
|
+
function _extends$4() { return _extends$4 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$4.apply(null, arguments); }
|
|
25230
25281
|
var SvgTransformTranslate = function SvgTransformTranslate(props) {
|
|
25231
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
25282
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
25232
25283
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25233
25284
|
width: 20,
|
|
25234
25285
|
height: 20,
|
|
25235
25286
|
fill: "none"
|
|
25236
|
-
}, props), _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
25287
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React.createElement("g", {
|
|
25237
25288
|
clipPath: "url(#transform-translate_svg__a)"
|
|
25238
25289
|
}, /*#__PURE__*/React.createElement("circle", {
|
|
25239
25290
|
cx: 10,
|
|
@@ -25243,7 +25294,7 @@ var SvgTransformTranslate = function SvgTransformTranslate(props) {
|
|
|
25243
25294
|
}), /*#__PURE__*/React.createElement("path", {
|
|
25244
25295
|
fill: "#fff",
|
|
25245
25296
|
d: "M16.18 10.758a.8.8 0 0 0-.105-1.218l-1.66-1.66a.801.801 0 0 0-1.132 1.132l.383.381h-2.96V6.418l.385.386a.8.8 0 1 0 1.131-1.13l-1.75-1.75a.8.8 0 0 0-1.222.11L7.594 5.689a.8.8 0 0 0 1.131 1.13l.381-.38v2.954H6.137l.381-.38a.8.8 0 1 0-1.13-1.132l-1.752 1.75a.8.8 0 0 0 .106 1.22l1.66 1.66a.801.801 0 0 0 1.132-1.133l-.386-.385h2.958v2.972l-.38-.38a.8.8 0 0 0-1.132 1.131l1.751 1.75a.8.8 0 0 0 1.223-.11l1.654-1.655a.8.8 0 1 0-1.13-1.131l-.386.386v-2.963h2.978l-.385.384a.8.8 0 1 0 1.131 1.131z"
|
|
25246
|
-
}))), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
25297
|
+
}))), _defs$3 || (_defs$3 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
25247
25298
|
id: "transform-translate_svg__b",
|
|
25248
25299
|
x1: 17.727,
|
|
25249
25300
|
x2: -1.215,
|
|
@@ -25916,6 +25967,97 @@ const useDoodleTransform = (data, onTransformChange, options) => {
|
|
|
25916
25967
|
};
|
|
25917
25968
|
};
|
|
25918
25969
|
|
|
25970
|
+
var _g$2, _defs$2;
|
|
25971
|
+
function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
|
|
25972
|
+
var SvgDisabledRotate = function SvgDisabledRotate(props) {
|
|
25973
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
25974
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25975
|
+
width: 16,
|
|
25976
|
+
height: 16,
|
|
25977
|
+
fill: "none"
|
|
25978
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React.createElement("g", {
|
|
25979
|
+
clipPath: "url(#disabled-rotate_svg__a)"
|
|
25980
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
25981
|
+
fill: "#fff",
|
|
25982
|
+
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
25983
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
25984
|
+
fill: "#211F1F",
|
|
25985
|
+
fillOpacity: 0.4,
|
|
25986
|
+
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
25987
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
25988
|
+
fill: "#fff",
|
|
25989
|
+
fillOpacity: 0.7,
|
|
25990
|
+
d: "M9.192 11.775a4.36 4.36 0 0 1-5.277-3.93l-.013-.326v-.002a.655.655 0 0 1 1.31 0v.002a3.05 3.05 0 0 0 1.71 2.738l.208.091a3.05 3.05 0 0 0 1.781.147l.22-.057q.234-.07.451-.175l-.919-.354a.653.653 0 1 1 .47-1.22l2.033.782a.654.654 0 0 1 .251 1.047l.002.001a4.36 4.36 0 0 1-2.227 1.256M6.809 3.639a4.36 4.36 0 0 1 5.289 4.256v.002a.654.654 0 1 1-1.309 0v-.002a3.05 3.05 0 0 0-1.71-2.738l-.208-.091a3.05 3.05 0 0 0-1.781-.147l-.22.057a3 3 0 0 0-.451.175l.919.354a.654.654 0 0 1-.47 1.22l-2.033-.782a.654.654 0 0 1-.251-1.046l-.002-.002a4.36 4.36 0 0 1 2.227-1.256"
|
|
25991
|
+
}))), _defs$2 || (_defs$2 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
25992
|
+
id: "disabled-rotate_svg__a"
|
|
25993
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
25994
|
+
fill: "#fff",
|
|
25995
|
+
d: "M16 0H0v16h16z"
|
|
25996
|
+
})))));
|
|
25997
|
+
};
|
|
25998
|
+
|
|
25999
|
+
var _g$1, _defs$1;
|
|
26000
|
+
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
|
|
26001
|
+
var SvgDisabledScale = function SvgDisabledScale(props) {
|
|
26002
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
26003
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26004
|
+
width: 16,
|
|
26005
|
+
height: 16,
|
|
26006
|
+
fill: "none"
|
|
26007
|
+
}, props), _g$1 || (_g$1 = /*#__PURE__*/React.createElement("g", {
|
|
26008
|
+
clipPath: "url(#disabled-scale_svg__a)"
|
|
26009
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
26010
|
+
fill: "#fff",
|
|
26011
|
+
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
26012
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
26013
|
+
fill: "#211F1F",
|
|
26014
|
+
fillOpacity: 0.4,
|
|
26015
|
+
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
26016
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
26017
|
+
fill: "#fff",
|
|
26018
|
+
fillOpacity: 0.7,
|
|
26019
|
+
d: "M3.972 6.612a.64.64 0 0 0 1.28 0v-.437l4.554 4.554H9.41a.64.64 0 0 0 0 1.28h1.979a.64.64 0 0 0 .636-.606l.003-.036.001-1.98a.64.64 0 1 0-1.28.001v.474L6.158 5.27h.435a.64.64 0 0 0 0-1.28h-1.98a.64.64 0 0 0-.64.64z"
|
|
26020
|
+
}))), _defs$1 || (_defs$1 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
26021
|
+
id: "disabled-scale_svg__a"
|
|
26022
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
26023
|
+
fill: "#fff",
|
|
26024
|
+
d: "M0 16h16V0H0z"
|
|
26025
|
+
})))));
|
|
26026
|
+
};
|
|
26027
|
+
|
|
26028
|
+
var _g, _defs;
|
|
26029
|
+
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
|
|
26030
|
+
var SvgDisabledTranslate = function SvgDisabledTranslate(props) {
|
|
26031
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
26032
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26033
|
+
width: 16,
|
|
26034
|
+
height: 16,
|
|
26035
|
+
fill: "none"
|
|
26036
|
+
}, props), _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
26037
|
+
clipPath: "url(#disabled-translate_svg__a)"
|
|
26038
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
26039
|
+
cx: 8,
|
|
26040
|
+
cy: 8,
|
|
26041
|
+
r: 8,
|
|
26042
|
+
fill: "#fff"
|
|
26043
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
26044
|
+
cx: 8,
|
|
26045
|
+
cy: 8,
|
|
26046
|
+
r: 8,
|
|
26047
|
+
fill: "#211F1F",
|
|
26048
|
+
fillOpacity: 0.4
|
|
26049
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
26050
|
+
fill: "#fff",
|
|
26051
|
+
fillOpacity: 0.7,
|
|
26052
|
+
d: "M12.944 8.608a.64.64 0 0 0-.079-.97l-1.333-1.334a.64.64 0 0 0-.905.905l.305.305H8.564V5.136l.308.308a.642.642 0 0 0 .906-.906l-1.4-1.399a.64.64 0 0 0-.906 0q-.036.037-.064.08L6.075 4.55a.64.64 0 0 0 .905.905l.305-.304v2.362H4.91l.306-.306a.64.64 0 0 0-.904-.904l-1.4 1.4a.64.64 0 0 0 .077.97l1.334 1.333a.64.64 0 0 0 .906-.905l-.31-.309h2.367v2.38l-.304-.305a.64.64 0 1 0-.905.906l1.4 1.4a.64.64 0 0 0 .97-.08l1.332-1.333a.64.64 0 0 0-.905-.905l-.309.308v-2.37h2.385l-.31.309a.64.64 0 1 0 .905.904z"
|
|
26053
|
+
}))), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
26054
|
+
id: "disabled-translate_svg__a"
|
|
26055
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
26056
|
+
fill: "#fff",
|
|
26057
|
+
d: "M16 0H0v16h16z"
|
|
26058
|
+
})))));
|
|
26059
|
+
};
|
|
26060
|
+
|
|
25919
26061
|
var css_248z$5 = ".index-module_doodleHover__jIZHV path {\n fill: #2EC1B2;\n}";
|
|
25920
26062
|
var styles$5 = {"doodleHover":"index-module_doodleHover__jIZHV"};
|
|
25921
26063
|
styleInject(css_248z$5);
|
|
@@ -26114,15 +26256,16 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
26114
26256
|
const infoBoxHeight = 40 * overlayScale; // 信息框高度
|
|
26115
26257
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
26116
26258
|
const circleScale = platform === PlatformType.H5 ? 1.5 * overlayScale : 2 * overlayScale;
|
|
26117
|
-
|
|
26259
|
+
const disacledScale = circleScale * 1.2;
|
|
26260
|
+
return (jsxs(Fragment, { children: [jsx("polygon", { points: selectionBoxPoints.map((point) => `${point.x},${point.y}`).join(' '), fill: "none", stroke: "#B2B4B9", strokeWidth: "2", strokeDasharray: "5,5", vectorEffect: "non-scaling-stroke", ...(platform === PlatformType.H5
|
|
26118
26261
|
? {
|
|
26119
26262
|
onTouchStart: createReactEventHandler((e) => {
|
|
26120
26263
|
handleMouseDownWithDisabled(e);
|
|
26121
26264
|
}),
|
|
26122
26265
|
}
|
|
26123
26266
|
: {
|
|
26124
|
-
|
|
26125
|
-
}) }), jsx("
|
|
26267
|
+
// onMouseDown: handleMouseDownWithDisabled,
|
|
26268
|
+
}) }), jsx("g", { transform: `translate(${selectionBoxPoints[3].x}, ${selectionBoxPoints[3].y})`, children: jsx("g", { transformOrigin: "center", transform: `translate(-${10 * circleScale}, -${10 * circleScale}) scale(${disacledScale})`, children: jsx(SvgDisabledRotate, {}) }) }), jsx("g", { transform: `translate(${selectionBoxPoints[1].x}, ${selectionBoxPoints[1].y})`, children: jsx("g", { transformOrigin: "center", transform: `translate(-${10 * circleScale}, -${10 * circleScale}) scale(${disacledScale})`, children: jsx(SvgDisabledTranslate, {}) }) }), jsx("g", { transform: `translate(${selectionBoxPoints[2].x}, ${selectionBoxPoints[2].y})`, children: jsx("g", { transformOrigin: "center", transform: `translate(-${10 * circleScale}, -${10 * circleScale}) scale(${disacledScale})`, children: jsx(SvgDisabledScale, {}) }) }), platform === PlatformType.H5 && (jsx("foreignObject", { x: infoBoxX, y: infoBoxY, width: infoBoxWidth, height: infoBoxHeight, style: { textAlign: 'center' }, onClick: () => {
|
|
26126
26269
|
onClickInfo?.();
|
|
26127
26270
|
}, children: jsx("div", { style: {
|
|
26128
26271
|
padding: `5px ${10 * overlayScale}px`,
|
package/dist/index.js
CHANGED
|
@@ -10645,12 +10645,12 @@ const SCALE_FACTOR = 50; // 50像素/米
|
|
|
10645
10645
|
* 默认线宽设置
|
|
10646
10646
|
*/
|
|
10647
10647
|
const DEFAULT_LINE_WIDTHS = {
|
|
10648
|
-
BOUNDARY:
|
|
10649
|
-
OBSTACLE:
|
|
10648
|
+
BOUNDARY: 2,
|
|
10649
|
+
OBSTACLE: 2,
|
|
10650
10650
|
CHARGING_PILE: 3,
|
|
10651
10651
|
CHANNEL: 3,
|
|
10652
10652
|
PATH: 20,
|
|
10653
|
-
VISION_OFF_AREA:
|
|
10653
|
+
VISION_OFF_AREA: 2,
|
|
10654
10654
|
TIME_LIMIT_OBSTACLE: 1,
|
|
10655
10655
|
};
|
|
10656
10656
|
/**
|
|
@@ -13729,7 +13729,6 @@ class BaseData {
|
|
|
13729
13729
|
else {
|
|
13730
13730
|
this.computedArea = 0;
|
|
13731
13731
|
}
|
|
13732
|
-
this.canEdit = false;
|
|
13733
13732
|
}
|
|
13734
13733
|
}
|
|
13735
13734
|
/**
|
|
@@ -13752,7 +13751,6 @@ class BoundaryData extends BaseData {
|
|
|
13752
13751
|
this.recBaseAngle = originalData?.rec_base_angle;
|
|
13753
13752
|
this.channels = channels;
|
|
13754
13753
|
this.style = style;
|
|
13755
|
-
this.canEdit = true;
|
|
13756
13754
|
}
|
|
13757
13755
|
}
|
|
13758
13756
|
/**
|
|
@@ -13780,7 +13778,6 @@ class ObstacleData extends BaseData {
|
|
|
13780
13778
|
this.end_timestamp = originalData?.end_timestamp;
|
|
13781
13779
|
this.name = originalData?.name || 'Noname';
|
|
13782
13780
|
this.style = style;
|
|
13783
|
-
this.canEdit = true;
|
|
13784
13781
|
}
|
|
13785
13782
|
}
|
|
13786
13783
|
/**
|
|
@@ -13808,7 +13805,6 @@ class DoodleData extends BaseData {
|
|
|
13808
13805
|
this.style = style;
|
|
13809
13806
|
this.create_ts = originalData?.create_ts || Date.now();
|
|
13810
13807
|
this.expiration_ts = originalData?.expiration_ts || Date.now() + 3600000;
|
|
13811
|
-
this.canEdit = true;
|
|
13812
13808
|
this.computedArea = this.getDoodleComputedArea();
|
|
13813
13809
|
}
|
|
13814
13810
|
getDoodleComputedArea() {
|
|
@@ -13825,7 +13821,6 @@ class VisionOffData extends BaseData {
|
|
|
13825
13821
|
const convertedPoints = convertPointsFormat(originalData?.points) || [];
|
|
13826
13822
|
super(originalData?.id, exports.DataType.VISION_OFF, level, exports.RenderType.POLYGON, convertedPoints, originalData);
|
|
13827
13823
|
this.style = style;
|
|
13828
|
-
this.canEdit = true;
|
|
13829
13824
|
}
|
|
13830
13825
|
}
|
|
13831
13826
|
/**
|
|
@@ -22928,9 +22923,9 @@ const VertexElement = React.memo(({ r, stroke, fill, ...props }) => {
|
|
|
22928
22923
|
});
|
|
22929
22924
|
|
|
22930
22925
|
var _path$1;
|
|
22931
|
-
function _extends$
|
|
22926
|
+
function _extends$8() { return _extends$8 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$8.apply(null, arguments); }
|
|
22932
22927
|
var SvgDelete = function SvgDelete(props) {
|
|
22933
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22928
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
22934
22929
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22935
22930
|
width: 16,
|
|
22936
22931
|
height: 16,
|
|
@@ -23587,6 +23582,34 @@ const useCheckElement = () => {
|
|
|
23587
23582
|
};
|
|
23588
23583
|
};
|
|
23589
23584
|
|
|
23585
|
+
const Tooltip = ({ open, x, y, text, style, onClick }) => {
|
|
23586
|
+
if (!open)
|
|
23587
|
+
return null;
|
|
23588
|
+
const tooltipStyle = {
|
|
23589
|
+
position: 'fixed',
|
|
23590
|
+
left: x,
|
|
23591
|
+
top: y,
|
|
23592
|
+
backgroundColor: '#fff',
|
|
23593
|
+
borderRadius: '4px',
|
|
23594
|
+
height: '20px',
|
|
23595
|
+
lineHeight: '16px',
|
|
23596
|
+
fontSize: '12px',
|
|
23597
|
+
color: '#211F1F',
|
|
23598
|
+
padding: '2px 4px',
|
|
23599
|
+
whiteSpace: 'nowrap',
|
|
23600
|
+
zIndex: 9999,
|
|
23601
|
+
cursor: 'pointer',
|
|
23602
|
+
userSelect: 'none',
|
|
23603
|
+
...style,
|
|
23604
|
+
};
|
|
23605
|
+
// 使用 createPortal 挂载到 body
|
|
23606
|
+
return ReactDOM.createPortal(jsxRuntime.jsx("div", { style: tooltipStyle, onClick: (e) => {
|
|
23607
|
+
e.preventDefault();
|
|
23608
|
+
e.stopPropagation();
|
|
23609
|
+
onClick?.();
|
|
23610
|
+
}, children: text }), document.body);
|
|
23611
|
+
};
|
|
23612
|
+
|
|
23590
23613
|
/**
|
|
23591
23614
|
* 将坐标点数组转换为polygon points字符串
|
|
23592
23615
|
* @param coordinates 坐标点数组 [[x1, y1], [x2, y2], ...]
|
|
@@ -23725,6 +23748,15 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
23725
23748
|
}, [svgRef]);
|
|
23726
23749
|
// 删除确认 Tooltip 状态
|
|
23727
23750
|
const [tooltipIndex, setTooltipIndex] = React.useState(null);
|
|
23751
|
+
const [tooltipPos, setTooltipPos] = React.useState({ x: 0, y: 0 });
|
|
23752
|
+
const [completeTooltipOpen, setCompleteTooltipOpen] = React.useState(false);
|
|
23753
|
+
const updateTooltipPos = (target) => {
|
|
23754
|
+
const rect = target.getBoundingClientRect();
|
|
23755
|
+
setTooltipPos({
|
|
23756
|
+
x: rect.left + rect.width + 4,
|
|
23757
|
+
y: rect.top - 10
|
|
23758
|
+
});
|
|
23759
|
+
};
|
|
23728
23760
|
// 处理顶点点击(仅透出点击;不触发删除)
|
|
23729
23761
|
const handleVertexClick = React.useCallback((e, index) => {
|
|
23730
23762
|
// 阻止事件冒泡到Google Maps
|
|
@@ -23739,6 +23771,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
23739
23771
|
window.clearTimeout(clickTimerRef.current);
|
|
23740
23772
|
}
|
|
23741
23773
|
clickTimerRef.current = window.setTimeout(() => {
|
|
23774
|
+
setCompleteTooltipOpen(false);
|
|
23742
23775
|
// 创建模式下点击顶点回调(仅透出点击)
|
|
23743
23776
|
if (onPointClick) {
|
|
23744
23777
|
onPointClick(index, e);
|
|
@@ -24262,12 +24295,17 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24262
24295
|
if (isDash && showStraddleBoundaryBorder) {
|
|
24263
24296
|
return (jsxRuntime.jsx(DashPath, { className: canSelect ? styles$6.polygonPath : '', points: segment.points, stroke: strokeColor, strokeWidth: isHover ? strokeWidth + 1 : strokeWidth, strokeOpacity: strokeOpacity }, index));
|
|
24264
24297
|
}
|
|
24265
|
-
return (jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke:
|
|
24266
|
-
|
|
24267
|
-
|
|
24268
|
-
|
|
24269
|
-
|
|
24270
|
-
|
|
24298
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(editMode || createMode) && (jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke: '#fff', strokeWidth: strokeWidth * 2, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke", style: {
|
|
24299
|
+
userSelect: 'none',
|
|
24300
|
+
WebkitUserSelect: 'none',
|
|
24301
|
+
WebkitTouchCallout: 'none',
|
|
24302
|
+
touchAction: 'none',
|
|
24303
|
+
} }, 'warp' + index)), jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke: strokeColor, strokeWidth: isHover ? strokeWidth + 1 : strokeWidth, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", className: canSelect ? styles$6.polygonPath : '', vectorEffect: "non-scaling-stroke", onClick: onPathClick, style: {
|
|
24304
|
+
userSelect: 'none',
|
|
24305
|
+
WebkitUserSelect: 'none',
|
|
24306
|
+
WebkitTouchCallout: 'none',
|
|
24307
|
+
touchAction: 'none',
|
|
24308
|
+
} }, index)] }));
|
|
24271
24309
|
}) }), (editMode || (createMode && completed)) &&
|
|
24272
24310
|
renderCoordinates.length >= 2 &&
|
|
24273
24311
|
renderCoordinates.map((coord, index) => {
|
|
@@ -24305,7 +24343,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24305
24343
|
setHoverVertex(null);
|
|
24306
24344
|
},
|
|
24307
24345
|
}) }, `edge-${index}`));
|
|
24308
|
-
}), 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 * 1.5 : 30 * overlayScale, unitType: unitType }), 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 * 1.5 : 30 * overlayScale, showFirstDistance: platform !== exports.PlatformType.H5, unit: unitType }), 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)) &&
|
|
24346
|
+
}), ghostLastPath && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: ghostLastPath, stroke: '#fff', strokeWidth: strokeWidth * 2, vectorEffect: "non-scaling-stroke", opacity: 0.7 }), jsxRuntime.jsx("path", { d: ghostLastPath, stroke: strokeColor, strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", opacity: 0.7, onClick: onPathClick })] })), ghostFirstPath && renderCoordinates.length >= 2 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: ghostFirstPath, stroke: '#fff', strokeWidth: strokeWidth * 2, vectorEffect: "non-scaling-stroke", opacity: 0.7 }), 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 * 1.5 : 30 * overlayScale, unitType: unitType }), 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 * 1.5 : 30 * overlayScale, showFirstDistance: platform !== exports.PlatformType.H5, unit: unitType }), 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)) &&
|
|
24309
24347
|
renderCoordinates.map((coord, idx) => {
|
|
24310
24348
|
// 判断当前顶点的状态
|
|
24311
24349
|
const isLastPoint = idx === renderCoordinates.length - 1;
|
|
@@ -24345,6 +24383,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24345
24383
|
}, 300);
|
|
24346
24384
|
// 打开删除确认 Tooltip(仅在可编辑时)
|
|
24347
24385
|
if (editMode || (createMode && completed)) {
|
|
24386
|
+
updateTooltipPos(e.target);
|
|
24348
24387
|
setTooltipIndex(idx);
|
|
24349
24388
|
}
|
|
24350
24389
|
}, ...(platform === exports.PlatformType.H5
|
|
@@ -24420,7 +24459,14 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24420
24459
|
}
|
|
24421
24460
|
}
|
|
24422
24461
|
},
|
|
24423
|
-
|
|
24462
|
+
onMouseEnter: canComplete ? (e) => {
|
|
24463
|
+
setCompleteTooltipOpen(true);
|
|
24464
|
+
updateTooltipPos(e.target);
|
|
24465
|
+
} : undefined,
|
|
24466
|
+
onMouseLeave: canComplete ? () => {
|
|
24467
|
+
setCompleteTooltipOpen(false);
|
|
24468
|
+
} : undefined,
|
|
24469
|
+
}) }), platform === exports.PlatformType.H5 && tooltipIndex === idx && coordinates.length > 3 && (jsxRuntime.jsxs("g", { transform: `translate(${coord[0] + 4 * overlayScale * 2}, ${coord[1] - 4 * overlayScale * 2}) scale(${overlayScale * 2})`, onClick: (e) => {
|
|
24424
24470
|
e.preventDefault();
|
|
24425
24471
|
e.stopPropagation();
|
|
24426
24472
|
if (onVertexDelete &&
|
|
@@ -24443,7 +24489,12 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24443
24489
|
// >
|
|
24444
24490
|
// </rect>
|
|
24445
24491
|
)] }, `vertex-${idx}`));
|
|
24446
|
-
})
|
|
24492
|
+
}), platform === exports.PlatformType.WEB && tooltipIndex !== null && (jsxRuntime.jsx(Tooltip, { open: true, x: tooltipPos.x, y: tooltipPos.y, text: "Remove", onClick: () => {
|
|
24493
|
+
if (onVertexDelete && (editMode || (createMode && completed)) && coordinates.length > 3) {
|
|
24494
|
+
onVertexDelete(renderCoordinates?.length - 1 - tooltipIndex);
|
|
24495
|
+
}
|
|
24496
|
+
setTooltipIndex(null);
|
|
24497
|
+
} })), platform === exports.PlatformType.WEB && completeTooltipOpen && (jsxRuntime.jsx(Tooltip, { open: true, x: tooltipPos.x, y: tooltipPos.y, text: "Click to finish" }))] }));
|
|
24447
24498
|
};
|
|
24448
24499
|
|
|
24449
24500
|
const MowPartitionContext = React.createContext({
|
|
@@ -25122,15 +25173,15 @@ const useVisionOffTransform = (data, scaleConstraints
|
|
|
25122
25173
|
};
|
|
25123
25174
|
};
|
|
25124
25175
|
|
|
25125
|
-
var _g$
|
|
25126
|
-
function _extends$
|
|
25176
|
+
var _g$6, _defs$6;
|
|
25177
|
+
function _extends$7() { return _extends$7 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$7.apply(null, arguments); }
|
|
25127
25178
|
var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
25128
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25179
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
25129
25180
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25130
25181
|
width: 20,
|
|
25131
25182
|
height: 20,
|
|
25132
25183
|
fill: "none"
|
|
25133
|
-
}, props), _g$
|
|
25184
|
+
}, props), _g$6 || (_g$6 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
25134
25185
|
clipPath: "url(#transform-delete_svg__a)"
|
|
25135
25186
|
}, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
25136
25187
|
cx: 10,
|
|
@@ -25153,7 +25204,7 @@ var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
|
25153
25204
|
fill: "#fff",
|
|
25154
25205
|
rx: 0.8,
|
|
25155
25206
|
transform: "rotate(45 6.323 5.191)"
|
|
25156
|
-
}))), _defs$
|
|
25207
|
+
}))), _defs$6 || (_defs$6 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
25157
25208
|
id: "transform-delete_svg__b",
|
|
25158
25209
|
x1: 17.727,
|
|
25159
25210
|
x2: -1.215,
|
|
@@ -25173,15 +25224,15 @@ var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
|
25173
25224
|
})))));
|
|
25174
25225
|
};
|
|
25175
25226
|
|
|
25176
|
-
var _g$
|
|
25177
|
-
function _extends$
|
|
25227
|
+
var _g$5, _defs$5;
|
|
25228
|
+
function _extends$6() { return _extends$6 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$6.apply(null, arguments); }
|
|
25178
25229
|
var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
25179
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25230
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
25180
25231
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25181
25232
|
width: 21,
|
|
25182
25233
|
height: 20,
|
|
25183
25234
|
fill: "none"
|
|
25184
|
-
}, props), _g$
|
|
25235
|
+
}, props), _g$5 || (_g$5 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
25185
25236
|
clipPath: "url(#transform-rotate_svg__a)"
|
|
25186
25237
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
25187
25238
|
fill: "url(#transform-rotate_svg__b)",
|
|
@@ -25189,7 +25240,7 @@ var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
|
25189
25240
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
25190
25241
|
fill: "#fff",
|
|
25191
25242
|
d: "M11.602 14.719a5.447 5.447 0 0 1-6.608-5.116l-.004-.205a.818.818 0 0 1 1.633-.084l.004.084.01.285a3.81 3.81 0 0 0 2.127 3.137l.26.115a3.8 3.8 0 0 0 2.227.184l.276-.071q.29-.088.561-.219l-1.147-.441a.817.817 0 0 1 .587-1.525l2.54.977a.817.817 0 0 1 .316 1.308l.001.001a5.45 5.45 0 0 1-2.783 1.57M8.623 4.548a5.447 5.447 0 0 1 6.608 5.116l.004.204a.818.818 0 0 1-1.633.084l-.004-.084-.01-.284a3.81 3.81 0 0 0-2.127-3.138l-.26-.115a3.8 3.8 0 0 0-2.227-.184l-.276.072q-.29.087-.561.218l1.147.442a.817.817 0 0 1-.586 1.524l-2.542-.976a.817.817 0 0 1-.315-1.309 5.45 5.45 0 0 1 2.782-1.57"
|
|
25192
|
-
}))), _defs$
|
|
25243
|
+
}))), _defs$5 || (_defs$5 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
25193
25244
|
id: "transform-rotate_svg__b",
|
|
25194
25245
|
x1: 17.84,
|
|
25195
25246
|
x2: -1.103,
|
|
@@ -25209,15 +25260,15 @@ var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
|
25209
25260
|
})))));
|
|
25210
25261
|
};
|
|
25211
25262
|
|
|
25212
|
-
var _g$
|
|
25213
|
-
function _extends$
|
|
25263
|
+
var _g$4, _defs$4;
|
|
25264
|
+
function _extends$5() { return _extends$5 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$5.apply(null, arguments); }
|
|
25214
25265
|
var SvgTransformScale = function SvgTransformScale(props) {
|
|
25215
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25266
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
25216
25267
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25217
25268
|
width: 21,
|
|
25218
25269
|
height: 20,
|
|
25219
25270
|
fill: "none"
|
|
25220
|
-
}, props), _g$
|
|
25271
|
+
}, props), _g$4 || (_g$4 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
25221
25272
|
clipPath: "url(#transform-scale_svg__a)"
|
|
25222
25273
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
25223
25274
|
fill: "url(#transform-scale_svg__b)",
|
|
@@ -25225,7 +25276,7 @@ var SvgTransformScale = function SvgTransformScale(props) {
|
|
|
25225
25276
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
25226
25277
|
fill: "#fff",
|
|
25227
25278
|
d: "M5.078 8.265a.8.8 0 0 0 1.6.001v-.544l5.69 5.69h-.494a.8.8 0 0 0 0 1.6l2.474-.002a.8.8 0 0 0 .311-.062.8.8 0 0 0 .49-.738v-2.474a.8.8 0 1 0-1.6 0v.594L7.81 6.59h.544a.8.8 0 0 0 0-1.6H5.879a.8.8 0 0 0-.8.8z"
|
|
25228
|
-
}))), _defs$
|
|
25279
|
+
}))), _defs$4 || (_defs$4 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
25229
25280
|
id: "transform-scale_svg__b",
|
|
25230
25281
|
x1: 17.84,
|
|
25231
25282
|
x2: -1.103,
|
|
@@ -25245,15 +25296,15 @@ var SvgTransformScale = function SvgTransformScale(props) {
|
|
|
25245
25296
|
})))));
|
|
25246
25297
|
};
|
|
25247
25298
|
|
|
25248
|
-
var _g, _defs;
|
|
25249
|
-
function _extends$
|
|
25299
|
+
var _g$3, _defs$3;
|
|
25300
|
+
function _extends$4() { return _extends$4 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$4.apply(null, arguments); }
|
|
25250
25301
|
var SvgTransformTranslate = function SvgTransformTranslate(props) {
|
|
25251
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25302
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
25252
25303
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25253
25304
|
width: 20,
|
|
25254
25305
|
height: 20,
|
|
25255
25306
|
fill: "none"
|
|
25256
|
-
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
25307
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
25257
25308
|
clipPath: "url(#transform-translate_svg__a)"
|
|
25258
25309
|
}, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
25259
25310
|
cx: 10,
|
|
@@ -25263,7 +25314,7 @@ var SvgTransformTranslate = function SvgTransformTranslate(props) {
|
|
|
25263
25314
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
25264
25315
|
fill: "#fff",
|
|
25265
25316
|
d: "M16.18 10.758a.8.8 0 0 0-.105-1.218l-1.66-1.66a.801.801 0 0 0-1.132 1.132l.383.381h-2.96V6.418l.385.386a.8.8 0 1 0 1.131-1.13l-1.75-1.75a.8.8 0 0 0-1.222.11L7.594 5.689a.8.8 0 0 0 1.131 1.13l.381-.38v2.954H6.137l.381-.38a.8.8 0 1 0-1.13-1.132l-1.752 1.75a.8.8 0 0 0 .106 1.22l1.66 1.66a.801.801 0 0 0 1.132-1.133l-.386-.385h2.958v2.972l-.38-.38a.8.8 0 0 0-1.132 1.131l1.751 1.75a.8.8 0 0 0 1.223-.11l1.654-1.655a.8.8 0 1 0-1.13-1.131l-.386.386v-2.963h2.978l-.385.384a.8.8 0 1 0 1.131 1.131z"
|
|
25266
|
-
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
25317
|
+
}))), _defs$3 || (_defs$3 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
25267
25318
|
id: "transform-translate_svg__b",
|
|
25268
25319
|
x1: 17.727,
|
|
25269
25320
|
x2: -1.215,
|
|
@@ -25936,6 +25987,97 @@ const useDoodleTransform = (data, onTransformChange, options) => {
|
|
|
25936
25987
|
};
|
|
25937
25988
|
};
|
|
25938
25989
|
|
|
25990
|
+
var _g$2, _defs$2;
|
|
25991
|
+
function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
|
|
25992
|
+
var SvgDisabledRotate = function SvgDisabledRotate(props) {
|
|
25993
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
25994
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25995
|
+
width: 16,
|
|
25996
|
+
height: 16,
|
|
25997
|
+
fill: "none"
|
|
25998
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
25999
|
+
clipPath: "url(#disabled-rotate_svg__a)"
|
|
26000
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
26001
|
+
fill: "#fff",
|
|
26002
|
+
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
26003
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
26004
|
+
fill: "#211F1F",
|
|
26005
|
+
fillOpacity: 0.4,
|
|
26006
|
+
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
26007
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
26008
|
+
fill: "#fff",
|
|
26009
|
+
fillOpacity: 0.7,
|
|
26010
|
+
d: "M9.192 11.775a4.36 4.36 0 0 1-5.277-3.93l-.013-.326v-.002a.655.655 0 0 1 1.31 0v.002a3.05 3.05 0 0 0 1.71 2.738l.208.091a3.05 3.05 0 0 0 1.781.147l.22-.057q.234-.07.451-.175l-.919-.354a.653.653 0 1 1 .47-1.22l2.033.782a.654.654 0 0 1 .251 1.047l.002.001a4.36 4.36 0 0 1-2.227 1.256M6.809 3.639a4.36 4.36 0 0 1 5.289 4.256v.002a.654.654 0 1 1-1.309 0v-.002a3.05 3.05 0 0 0-1.71-2.738l-.208-.091a3.05 3.05 0 0 0-1.781-.147l-.22.057a3 3 0 0 0-.451.175l.919.354a.654.654 0 0 1-.47 1.22l-2.033-.782a.654.654 0 0 1-.251-1.046l-.002-.002a4.36 4.36 0 0 1 2.227-1.256"
|
|
26011
|
+
}))), _defs$2 || (_defs$2 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
26012
|
+
id: "disabled-rotate_svg__a"
|
|
26013
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
26014
|
+
fill: "#fff",
|
|
26015
|
+
d: "M16 0H0v16h16z"
|
|
26016
|
+
})))));
|
|
26017
|
+
};
|
|
26018
|
+
|
|
26019
|
+
var _g$1, _defs$1;
|
|
26020
|
+
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
|
|
26021
|
+
var SvgDisabledScale = function SvgDisabledScale(props) {
|
|
26022
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
26023
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26024
|
+
width: 16,
|
|
26025
|
+
height: 16,
|
|
26026
|
+
fill: "none"
|
|
26027
|
+
}, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
26028
|
+
clipPath: "url(#disabled-scale_svg__a)"
|
|
26029
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
26030
|
+
fill: "#fff",
|
|
26031
|
+
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
26032
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
26033
|
+
fill: "#211F1F",
|
|
26034
|
+
fillOpacity: 0.4,
|
|
26035
|
+
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
26036
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
26037
|
+
fill: "#fff",
|
|
26038
|
+
fillOpacity: 0.7,
|
|
26039
|
+
d: "M3.972 6.612a.64.64 0 0 0 1.28 0v-.437l4.554 4.554H9.41a.64.64 0 0 0 0 1.28h1.979a.64.64 0 0 0 .636-.606l.003-.036.001-1.98a.64.64 0 1 0-1.28.001v.474L6.158 5.27h.435a.64.64 0 0 0 0-1.28h-1.98a.64.64 0 0 0-.64.64z"
|
|
26040
|
+
}))), _defs$1 || (_defs$1 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
26041
|
+
id: "disabled-scale_svg__a"
|
|
26042
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
26043
|
+
fill: "#fff",
|
|
26044
|
+
d: "M0 16h16V0H0z"
|
|
26045
|
+
})))));
|
|
26046
|
+
};
|
|
26047
|
+
|
|
26048
|
+
var _g, _defs;
|
|
26049
|
+
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
|
|
26050
|
+
var SvgDisabledTranslate = function SvgDisabledTranslate(props) {
|
|
26051
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
26052
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26053
|
+
width: 16,
|
|
26054
|
+
height: 16,
|
|
26055
|
+
fill: "none"
|
|
26056
|
+
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
26057
|
+
clipPath: "url(#disabled-translate_svg__a)"
|
|
26058
|
+
}, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
26059
|
+
cx: 8,
|
|
26060
|
+
cy: 8,
|
|
26061
|
+
r: 8,
|
|
26062
|
+
fill: "#fff"
|
|
26063
|
+
}), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
26064
|
+
cx: 8,
|
|
26065
|
+
cy: 8,
|
|
26066
|
+
r: 8,
|
|
26067
|
+
fill: "#211F1F",
|
|
26068
|
+
fillOpacity: 0.4
|
|
26069
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
26070
|
+
fill: "#fff",
|
|
26071
|
+
fillOpacity: 0.7,
|
|
26072
|
+
d: "M12.944 8.608a.64.64 0 0 0-.079-.97l-1.333-1.334a.64.64 0 0 0-.905.905l.305.305H8.564V5.136l.308.308a.642.642 0 0 0 .906-.906l-1.4-1.399a.64.64 0 0 0-.906 0q-.036.037-.064.08L6.075 4.55a.64.64 0 0 0 .905.905l.305-.304v2.362H4.91l.306-.306a.64.64 0 0 0-.904-.904l-1.4 1.4a.64.64 0 0 0 .077.97l1.334 1.333a.64.64 0 0 0 .906-.905l-.31-.309h2.367v2.38l-.304-.305a.64.64 0 1 0-.905.906l1.4 1.4a.64.64 0 0 0 .97-.08l1.332-1.333a.64.64 0 0 0-.905-.905l-.309.308v-2.37h2.385l-.31.309a.64.64 0 1 0 .905.904z"
|
|
26073
|
+
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
26074
|
+
id: "disabled-translate_svg__a"
|
|
26075
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
26076
|
+
fill: "#fff",
|
|
26077
|
+
d: "M16 0H0v16h16z"
|
|
26078
|
+
})))));
|
|
26079
|
+
};
|
|
26080
|
+
|
|
25939
26081
|
var css_248z$5 = ".index-module_doodleHover__jIZHV path {\n fill: #2EC1B2;\n}";
|
|
25940
26082
|
var styles$5 = {"doodleHover":"index-module_doodleHover__jIZHV"};
|
|
25941
26083
|
styleInject(css_248z$5);
|
|
@@ -26134,15 +26276,16 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
26134
26276
|
const infoBoxHeight = 40 * overlayScale; // 信息框高度
|
|
26135
26277
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
26136
26278
|
const circleScale = platform === exports.PlatformType.H5 ? 1.5 * overlayScale : 2 * overlayScale;
|
|
26137
|
-
|
|
26279
|
+
const disacledScale = circleScale * 1.2;
|
|
26280
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("polygon", { points: selectionBoxPoints.map((point) => `${point.x},${point.y}`).join(' '), fill: "none", stroke: "#B2B4B9", strokeWidth: "2", strokeDasharray: "5,5", vectorEffect: "non-scaling-stroke", ...(platform === exports.PlatformType.H5
|
|
26138
26281
|
? {
|
|
26139
26282
|
onTouchStart: createReactEventHandler((e) => {
|
|
26140
26283
|
handleMouseDownWithDisabled(e);
|
|
26141
26284
|
}),
|
|
26142
26285
|
}
|
|
26143
26286
|
: {
|
|
26144
|
-
|
|
26145
|
-
}) }), jsxRuntime.jsx("
|
|
26287
|
+
// onMouseDown: handleMouseDownWithDisabled,
|
|
26288
|
+
}) }), jsxRuntime.jsx("g", { transform: `translate(${selectionBoxPoints[3].x}, ${selectionBoxPoints[3].y})`, children: jsxRuntime.jsx("g", { transformOrigin: "center", transform: `translate(-${10 * circleScale}, -${10 * circleScale}) scale(${disacledScale})`, children: jsxRuntime.jsx(SvgDisabledRotate, {}) }) }), jsxRuntime.jsx("g", { transform: `translate(${selectionBoxPoints[1].x}, ${selectionBoxPoints[1].y})`, children: jsxRuntime.jsx("g", { transformOrigin: "center", transform: `translate(-${10 * circleScale}, -${10 * circleScale}) scale(${disacledScale})`, children: jsxRuntime.jsx(SvgDisabledTranslate, {}) }) }), jsxRuntime.jsx("g", { transform: `translate(${selectionBoxPoints[2].x}, ${selectionBoxPoints[2].y})`, children: jsxRuntime.jsx("g", { transformOrigin: "center", transform: `translate(-${10 * circleScale}, -${10 * circleScale}) scale(${disacledScale})`, children: jsxRuntime.jsx(SvgDisabledScale, {}) }) }), platform === exports.PlatformType.H5 && (jsxRuntime.jsx("foreignObject", { x: infoBoxX, y: infoBoxY, width: infoBoxWidth, height: infoBoxHeight, style: { textAlign: 'center' }, onClick: () => {
|
|
26146
26289
|
onClickInfo?.();
|
|
26147
26290
|
}, children: jsxRuntime.jsx("div", { style: {
|
|
26148
26291
|
padding: `5px ${10 * overlayScale}px`,
|
|
@@ -48,7 +48,6 @@ export declare class BaseData<T> {
|
|
|
48
48
|
renderType: RenderType;
|
|
49
49
|
computedArea?: number;
|
|
50
50
|
originalData?: T;
|
|
51
|
-
canEdit: boolean;
|
|
52
51
|
constructor(id: string | number, type: DataType, level: number, renderType: RenderType, points?: number[][], originalData?: T);
|
|
53
52
|
}
|
|
54
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseData.d.ts","sourceRoot":"","sources":["../../../src/processor/unified/BaseData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,YAAY,IAAI,eAAe,EAC/B,iBAAiB,IAAI,gBAAgB,EACrC,qBAAqB,IAAI,aAAa,EACtC,cAAc,EACf,MAAM,SAAS,CAAC;AAKjB,KAAK,cAAc,GAAG,aAAa,CAAC;AACpC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CACpB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ;IAClB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,UAAU,cAAc;IACxB,OAAO,YAAY;IACnB,aAAa,iBAAiB;IAC9B,QAAQ,YAAY;CACrB;AAED;;GAEG;AACH,oBAAY,UAAU;IACpB,KAAK,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a,EAAE,CAAC;IACxC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;IACnC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC/C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TooltipProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
text: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const Tooltip: React.FC<TooltipProps>;
|
|
11
|
+
export default Tooltip;
|
|
12
|
+
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/PolygonELement/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,YAAY;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAoCnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/PolygonELement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/PolygonELement/index.tsx"],"names":[],"mappings":"AAAA,O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G,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,CAsuCxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DoodleTransformWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/TransformWrapper/DoodleTransformWrapper/DoodleTransformWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"DoodleTransformWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/TransformWrapper/DoodleTransformWrapper/DoodleTransformWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAkBjD,UAAU,2BAA2B;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,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,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA0iBjE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|