@fleet-frontend/mower-maps 0.2.6-beta.2 → 0.2.6-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +136 -195
- package/dist/index.js +136 -195
- package/dist/render/MowerPartitionPickerMap.d.ts +1 -1
- package/dist/render/MowerPartitionPickerMap.d.ts.map +1 -1
- package/dist/render/partitionPicker/constants.d.ts +34 -33
- package/dist/render/partitionPicker/constants.d.ts.map +1 -1
- package/dist/render/partitionPicker/hooks/useMapViewport.d.ts.map +1 -1
- package/dist/render/partitionPicker/layers/PartitionNameLabels.d.ts +1 -3
- package/dist/render/partitionPicker/layers/PartitionNameLabels.d.ts.map +1 -1
- package/dist/render/partitionPicker/layers/PartitionPickerGridSvg.d.ts.map +1 -1
- package/dist/render/partitionPicker/layers/PartitionPickerSvg.d.ts +1 -2
- package/dist/render/partitionPicker/layers/PartitionPickerSvg.d.ts.map +1 -1
- package/dist/render/partitionPicker/layers/SelectableBoundaryElement.d.ts +2 -4
- package/dist/render/partitionPicker/layers/SelectableBoundaryElement.d.ts.map +1 -1
- package/dist/render/partitionPicker/viewportUtils.d.ts +6 -7
- package/dist/render/partitionPicker/viewportUtils.d.ts.map +1 -1
- package/dist/render/svgElement/TransformWrapper/DoodleTransformWrapper/DoodleTransformWrapper.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22976,9 +22976,9 @@ const VertexElement = React.memo(({ r, stroke, fill, ...props }) => {
|
|
|
22976
22976
|
});
|
|
22977
22977
|
|
|
22978
22978
|
var _path$1;
|
|
22979
|
-
function _extends$
|
|
22979
|
+
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); }
|
|
22980
22980
|
var SvgDelete = function SvgDelete(props) {
|
|
22981
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22981
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
22982
22982
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22983
22983
|
width: 16,
|
|
22984
22984
|
height: 16,
|
|
@@ -23568,15 +23568,13 @@ function computePolygonScreenWidthPx(points, viewBox, containerWidth, containerH
|
|
|
23568
23568
|
const scale = getViewBoxMeetScale(viewBox, containerWidth, containerHeight);
|
|
23569
23569
|
return mapWidth * scale;
|
|
23570
23570
|
}
|
|
23571
|
-
function scaleStrokeWidthForViewBox(
|
|
23572
|
-
const { containerWidth, containerHeight,
|
|
23571
|
+
function scaleStrokeWidthForViewBox(viewBox, options) {
|
|
23572
|
+
const { containerWidth, containerHeight, targetScreenStrokePx = 2 } = options;
|
|
23573
23573
|
const meetScale = getViewBoxMeetScale(viewBox, containerWidth, containerHeight);
|
|
23574
|
-
|
|
23575
|
-
|
|
23576
|
-
return baseStrokeWidth;
|
|
23574
|
+
if (meetScale <= 0 || !Number.isFinite(targetScreenStrokePx)) {
|
|
23575
|
+
return targetScreenStrokePx;
|
|
23577
23576
|
}
|
|
23578
|
-
|
|
23579
|
-
return targetScreenPx / meetScale;
|
|
23577
|
+
return targetScreenStrokePx / meetScale;
|
|
23580
23578
|
}
|
|
23581
23579
|
/** 屏幕拖拽像素 → viewBox 坐标增量(与 mapPointToContainerPercent 互逆,供 applyPan 使用) */
|
|
23582
23580
|
function containerDeltaToViewBoxDelta(deltaXPx, deltaYPx, viewBox, containerWidth, containerHeight, mapRotationDeg = 0) {
|
|
@@ -26294,15 +26292,15 @@ const useVisionOffTransform = (data, scaleConstraints
|
|
|
26294
26292
|
};
|
|
26295
26293
|
};
|
|
26296
26294
|
|
|
26297
|
-
var _g$
|
|
26298
|
-
function _extends$
|
|
26295
|
+
var _g$3, _defs$3;
|
|
26296
|
+
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); }
|
|
26299
26297
|
var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
26300
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
26298
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
26301
26299
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26302
26300
|
width: 20,
|
|
26303
26301
|
height: 20,
|
|
26304
26302
|
fill: "none"
|
|
26305
|
-
}, props), _g$
|
|
26303
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
26306
26304
|
clipPath: "url(#transform-delete_svg__a)"
|
|
26307
26305
|
}, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
26308
26306
|
cx: 10,
|
|
@@ -26325,7 +26323,7 @@ var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
|
26325
26323
|
fill: "#fff",
|
|
26326
26324
|
rx: 0.8,
|
|
26327
26325
|
transform: "rotate(45 6.323 5.191)"
|
|
26328
|
-
}))), _defs$
|
|
26326
|
+
}))), _defs$3 || (_defs$3 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
26329
26327
|
id: "transform-delete_svg__b",
|
|
26330
26328
|
x1: 17.727,
|
|
26331
26329
|
x2: -1.215,
|
|
@@ -26345,15 +26343,15 @@ var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
|
26345
26343
|
})))));
|
|
26346
26344
|
};
|
|
26347
26345
|
|
|
26348
|
-
var _g$
|
|
26349
|
-
function _extends$
|
|
26346
|
+
var _g$2, _defs$2;
|
|
26347
|
+
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); }
|
|
26350
26348
|
var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
26351
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
26349
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
26352
26350
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26353
26351
|
width: 21,
|
|
26354
26352
|
height: 20,
|
|
26355
26353
|
fill: "none"
|
|
26356
|
-
}, props), _g$
|
|
26354
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
26357
26355
|
clipPath: "url(#transform-rotate_svg__a)"
|
|
26358
26356
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
26359
26357
|
fill: "url(#transform-rotate_svg__b)",
|
|
@@ -26361,7 +26359,7 @@ var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
|
26361
26359
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
26362
26360
|
fill: "#fff",
|
|
26363
26361
|
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"
|
|
26364
|
-
}))), _defs$
|
|
26362
|
+
}))), _defs$2 || (_defs$2 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
26365
26363
|
id: "transform-rotate_svg__b",
|
|
26366
26364
|
x1: 17.84,
|
|
26367
26365
|
x2: -1.103,
|
|
@@ -26381,15 +26379,15 @@ var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
|
26381
26379
|
})))));
|
|
26382
26380
|
};
|
|
26383
26381
|
|
|
26384
|
-
var _g$
|
|
26385
|
-
function _extends$
|
|
26382
|
+
var _g$1, _defs$1;
|
|
26383
|
+
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); }
|
|
26386
26384
|
var SvgTransformScale = function SvgTransformScale(props) {
|
|
26387
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
26385
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
26388
26386
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26389
26387
|
width: 21,
|
|
26390
26388
|
height: 20,
|
|
26391
26389
|
fill: "none"
|
|
26392
|
-
}, props), _g$
|
|
26390
|
+
}, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
26393
26391
|
clipPath: "url(#transform-scale_svg__a)"
|
|
26394
26392
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
26395
26393
|
fill: "url(#transform-scale_svg__b)",
|
|
@@ -26397,7 +26395,7 @@ var SvgTransformScale = function SvgTransformScale(props) {
|
|
|
26397
26395
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
26398
26396
|
fill: "#fff",
|
|
26399
26397
|
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"
|
|
26400
|
-
}))), _defs$
|
|
26398
|
+
}))), _defs$1 || (_defs$1 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
26401
26399
|
id: "transform-scale_svg__b",
|
|
26402
26400
|
x1: 17.84,
|
|
26403
26401
|
x2: -1.103,
|
|
@@ -26417,15 +26415,15 @@ var SvgTransformScale = function SvgTransformScale(props) {
|
|
|
26417
26415
|
})))));
|
|
26418
26416
|
};
|
|
26419
26417
|
|
|
26420
|
-
var _g
|
|
26421
|
-
function _extends$
|
|
26418
|
+
var _g, _defs;
|
|
26419
|
+
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); }
|
|
26422
26420
|
var SvgTransformTranslate = function SvgTransformTranslate(props) {
|
|
26423
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
26421
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
26424
26422
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26425
26423
|
width: 20,
|
|
26426
26424
|
height: 20,
|
|
26427
26425
|
fill: "none"
|
|
26428
|
-
}, props), _g
|
|
26426
|
+
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
26429
26427
|
clipPath: "url(#transform-translate_svg__a)"
|
|
26430
26428
|
}, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
26431
26429
|
cx: 10,
|
|
@@ -26435,7 +26433,7 @@ var SvgTransformTranslate = function SvgTransformTranslate(props) {
|
|
|
26435
26433
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
26436
26434
|
fill: "#fff",
|
|
26437
26435
|
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"
|
|
26438
|
-
}))), _defs
|
|
26436
|
+
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
26439
26437
|
id: "transform-translate_svg__b",
|
|
26440
26438
|
x1: 17.727,
|
|
26441
26439
|
x2: -1.215,
|
|
@@ -27109,97 +27107,6 @@ const useDoodleTransform = (data, onTransformChange, options) => {
|
|
|
27109
27107
|
};
|
|
27110
27108
|
};
|
|
27111
27109
|
|
|
27112
|
-
var _g$2, _defs$2;
|
|
27113
|
-
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); }
|
|
27114
|
-
var SvgDisabledRotate = function SvgDisabledRotate(props) {
|
|
27115
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
27116
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
27117
|
-
width: 16,
|
|
27118
|
-
height: 16,
|
|
27119
|
-
fill: "none"
|
|
27120
|
-
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
27121
|
-
clipPath: "url(#disabled-rotate_svg__a)"
|
|
27122
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
27123
|
-
fill: "#fff",
|
|
27124
|
-
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
27125
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
27126
|
-
fill: "#211F1F",
|
|
27127
|
-
fillOpacity: 0.4,
|
|
27128
|
-
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
27129
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
27130
|
-
fill: "#fff",
|
|
27131
|
-
fillOpacity: 0.7,
|
|
27132
|
-
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"
|
|
27133
|
-
}))), _defs$2 || (_defs$2 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
27134
|
-
id: "disabled-rotate_svg__a"
|
|
27135
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
27136
|
-
fill: "#fff",
|
|
27137
|
-
d: "M16 0H0v16h16z"
|
|
27138
|
-
})))));
|
|
27139
|
-
};
|
|
27140
|
-
|
|
27141
|
-
var _g$1, _defs$1;
|
|
27142
|
-
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); }
|
|
27143
|
-
var SvgDisabledScale = function SvgDisabledScale(props) {
|
|
27144
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
27145
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
27146
|
-
width: 16,
|
|
27147
|
-
height: 16,
|
|
27148
|
-
fill: "none"
|
|
27149
|
-
}, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
27150
|
-
clipPath: "url(#disabled-scale_svg__a)"
|
|
27151
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
27152
|
-
fill: "#fff",
|
|
27153
|
-
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
27154
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
27155
|
-
fill: "#211F1F",
|
|
27156
|
-
fillOpacity: 0.4,
|
|
27157
|
-
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0"
|
|
27158
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
27159
|
-
fill: "#fff",
|
|
27160
|
-
fillOpacity: 0.7,
|
|
27161
|
-
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"
|
|
27162
|
-
}))), _defs$1 || (_defs$1 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
27163
|
-
id: "disabled-scale_svg__a"
|
|
27164
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
27165
|
-
fill: "#fff",
|
|
27166
|
-
d: "M0 16h16V0H0z"
|
|
27167
|
-
})))));
|
|
27168
|
-
};
|
|
27169
|
-
|
|
27170
|
-
var _g, _defs;
|
|
27171
|
-
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); }
|
|
27172
|
-
var SvgDisabledTranslate = function SvgDisabledTranslate(props) {
|
|
27173
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
27174
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
27175
|
-
width: 16,
|
|
27176
|
-
height: 16,
|
|
27177
|
-
fill: "none"
|
|
27178
|
-
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
27179
|
-
clipPath: "url(#disabled-translate_svg__a)"
|
|
27180
|
-
}, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
27181
|
-
cx: 8,
|
|
27182
|
-
cy: 8,
|
|
27183
|
-
r: 8,
|
|
27184
|
-
fill: "#fff"
|
|
27185
|
-
}), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
27186
|
-
cx: 8,
|
|
27187
|
-
cy: 8,
|
|
27188
|
-
r: 8,
|
|
27189
|
-
fill: "#211F1F",
|
|
27190
|
-
fillOpacity: 0.4
|
|
27191
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
27192
|
-
fill: "#fff",
|
|
27193
|
-
fillOpacity: 0.7,
|
|
27194
|
-
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"
|
|
27195
|
-
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
27196
|
-
id: "disabled-translate_svg__a"
|
|
27197
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
27198
|
-
fill: "#fff",
|
|
27199
|
-
d: "M16 0H0v16h16z"
|
|
27200
|
-
})))));
|
|
27201
|
-
};
|
|
27202
|
-
|
|
27203
27110
|
var css_248z$6 = ".index-module_doodleHover__jIZHV path {\n fill: #00B3A1;\n}";
|
|
27204
27111
|
var styles$6 = {"doodleHover":"index-module_doodleHover__jIZHV"};
|
|
27205
27112
|
styleInject(css_248z$6);
|
|
@@ -27398,8 +27305,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
27398
27305
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
27399
27306
|
const infoBoxHeight = 40 * overlayScale; // 信息框高度
|
|
27400
27307
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
27401
|
-
const circleScale = platform === exports.PlatformType.H5 ? 1.5 * overlayScale :
|
|
27402
|
-
const disacledScale = circleScale * 1.2;
|
|
27308
|
+
const circleScale = platform === exports.PlatformType.H5 ? 1.5 * overlayScale : 2 * overlayScale;
|
|
27403
27309
|
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
|
|
27404
27310
|
? {
|
|
27405
27311
|
onTouchStart: createReactEventHandler((e) => {
|
|
@@ -27408,7 +27314,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
27408
27314
|
}
|
|
27409
27315
|
: {
|
|
27410
27316
|
// onMouseDown: handleMouseDownWithDisabled,
|
|
27411
|
-
}) }), jsxRuntime.jsx("
|
|
27317
|
+
}) }), jsxRuntime.jsx("circle", { cx: selectionBoxPoints[0].x, cy: selectionBoxPoints[0].y, r: 10 * circleScale, fill: "#B2B4B9", stroke: "none" }), jsxRuntime.jsx("circle", { cx: selectionBoxPoints[3].x, cy: selectionBoxPoints[3].y, r: 10 * circleScale, fill: "#B2B4B9", stroke: "none" }), jsxRuntime.jsx("circle", { cx: selectionBoxPoints[1].x, cy: selectionBoxPoints[1].y, r: 10 * circleScale, fill: "#B2B4B9", stroke: "none" }), jsxRuntime.jsx("circle", { cx: selectionBoxPoints[2].x, cy: selectionBoxPoints[2].y, r: 10 * circleScale, fill: "#B2B4B9", stroke: "none" }), platform === exports.PlatformType.H5 && (jsxRuntime.jsx("foreignObject", { x: infoBoxX, y: infoBoxY, width: infoBoxWidth, height: infoBoxHeight, style: { textAlign: 'center' }, onClick: () => {
|
|
27412
27318
|
onClickInfo?.();
|
|
27413
27319
|
}, children: jsxRuntime.jsx("div", { style: {
|
|
27414
27320
|
padding: `5px ${10 * overlayScale}px`,
|
|
@@ -27428,7 +27334,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
27428
27334
|
justifyContent: 'center',
|
|
27429
27335
|
gap: '10px',
|
|
27430
27336
|
color: '#325069',
|
|
27431
|
-
}, children: jsxRuntime.jsxs("div", { children: [locale?.['map.renderer.
|
|
27337
|
+
}, children: jsxRuntime.jsxs("div", { children: [locale?.['map.renderer.remainTime'] || 'Remaining time', ": ", remainingTime] }) }) }) }))] }));
|
|
27432
27338
|
};
|
|
27433
27339
|
React.useEffect(() => {
|
|
27434
27340
|
const isMove = isDragging || isRotating || isScaling;
|
|
@@ -30864,15 +30770,27 @@ const BoundarySvgRender = React.memo(({ mapJson, unStructMapData, id, maxWidth =
|
|
|
30864
30770
|
});
|
|
30865
30771
|
|
|
30866
30772
|
/** ChannelClipPath 等内容裁剪使用的 SVG 坐标边距(与用户传入的屏幕 padding 无关) */
|
|
30867
|
-
const PARTITION_PICKER_CONTENT_CLIP_PADDING =
|
|
30773
|
+
const PARTITION_PICKER_CONTENT_CLIP_PADDING = 0;
|
|
30868
30774
|
/** H5:子区域屏幕宽度超过该值才展示名称标签(px) */
|
|
30869
|
-
const H5_PARTITION_LABEL_MIN_SCREEN_WIDTH_PX =
|
|
30775
|
+
const H5_PARTITION_LABEL_MIN_SCREEN_WIDTH_PX = 92;
|
|
30870
30776
|
/** H5:名称气泡总宽度(px) */
|
|
30871
|
-
const H5_PARTITION_LABEL_WIDTH_PX =
|
|
30872
|
-
/**
|
|
30873
|
-
const
|
|
30874
|
-
/**
|
|
30875
|
-
const
|
|
30777
|
+
const H5_PARTITION_LABEL_WIDTH_PX = 92;
|
|
30778
|
+
/** Web:序号徽章与名称标签间距(px) */
|
|
30779
|
+
const WEB_SELECTION_ORDER_GAP_PX = 8;
|
|
30780
|
+
/** H5:序号徽章与名称标签间距(px) */
|
|
30781
|
+
const H5_SELECTION_ORDER_GAP_PX = 4;
|
|
30782
|
+
/** Standalone:充电桩图标最小屏幕尺寸(px),缩小全图 fit 时避免过小;放大时随 viewBox 同比缩放 */
|
|
30783
|
+
const PARTITION_PICKER_CHARGING_PILE_MIN_DISPLAY_PX = 16;
|
|
30784
|
+
/** Web 地块描边屏幕像素宽度:未选中 2px,选中 3px */
|
|
30785
|
+
const WEB_PARTITION_BOUNDARY_STROKE_PX = {
|
|
30786
|
+
default: 2,
|
|
30787
|
+
selected: 3,
|
|
30788
|
+
};
|
|
30789
|
+
/** H5 地块描边屏幕像素宽度:选中与否均为 1px */
|
|
30790
|
+
const H5_PARTITION_BOUNDARY_STROKE_PX = {
|
|
30791
|
+
default: 1,
|
|
30792
|
+
selected: 1,
|
|
30793
|
+
};
|
|
30876
30794
|
/**
|
|
30877
30795
|
* Figma bg/mapping 地图网格背景(Standalone SVG 层)
|
|
30878
30796
|
* @see https://www.figma.com/design/j0DdUYf8VFkXQ8ikkA6ZzP — node 20490:84886
|
|
@@ -30880,17 +30798,17 @@ const PARTITION_BOUNDARY_EMPHASIZED_TARGET_SCREEN_STROKE_PX = 2.5;
|
|
|
30880
30798
|
/** 网格区域底色,也用于容器 letterbox 留白 */
|
|
30881
30799
|
const PARTITION_PICKER_GRID_BASE_COLOR = '#E3E5EB';
|
|
30882
30800
|
/** 网格单元边长(SVG 地图坐标,与 viewBox 一致;zoom 时间距同比缩放) */
|
|
30883
|
-
const PARTITION_PICKER_GRID_TILE_SIZE =
|
|
30801
|
+
const PARTITION_PICKER_GRID_TILE_SIZE = 10;
|
|
30884
30802
|
/** 网格线宽(地图坐标;随 zoom 同比缩放,不做屏幕像素恒定) */
|
|
30885
|
-
const PARTITION_PICKER_GRID_LINE_WIDTH =
|
|
30803
|
+
const PARTITION_PICKER_GRID_LINE_WIDTH = 0.5;
|
|
30886
30804
|
/** 网格交点圆点半径(地图坐标) */
|
|
30887
|
-
const PARTITION_PICKER_GRID_DOT_RADIUS =
|
|
30805
|
+
const PARTITION_PICKER_GRID_DOT_RADIUS = 0.5;
|
|
30888
30806
|
/** 网格层整体不透明度(Figma 约 80%) */
|
|
30889
|
-
const PARTITION_PICKER_GRID_OPACITY = 0.
|
|
30807
|
+
const PARTITION_PICKER_GRID_OPACITY = 0.4;
|
|
30890
30808
|
/** 网格线与交点颜色 */
|
|
30891
30809
|
const PARTITION_PICKER_GRID_STROKE = '#FFFFFF';
|
|
30892
30810
|
/** 可见范围内交点超过该数量时跳过圆点,仅保留网格线(缩小视野时减轻 DOM 压力) */
|
|
30893
|
-
const PARTITION_PICKER_GRID_MAX_INTERSECTION_DOTS =
|
|
30811
|
+
const PARTITION_PICKER_GRID_MAX_INTERSECTION_DOTS = 2000;
|
|
30894
30812
|
/**
|
|
30895
30813
|
* 分区选择地图专用样式
|
|
30896
30814
|
*
|
|
@@ -30915,37 +30833,27 @@ const PARTITION_PICKER_MAP_CONFIG = {
|
|
|
30915
30833
|
const PARTITION_PICKER_COLORS_WEB = {
|
|
30916
30834
|
defaultFill: 'rgba(222, 225, 231, 1)',
|
|
30917
30835
|
defaultStroke: 'rgba(132, 152, 169, 1)',
|
|
30918
|
-
defaultStrokeWidth: 2,
|
|
30919
30836
|
hoverFill: 'rgba(211, 216, 226, 1)',
|
|
30920
30837
|
hoverStroke: 'rgba(132, 152, 169, 1)',
|
|
30921
|
-
hoverStrokeWidth: 3,
|
|
30922
30838
|
selectedFill: 'rgba(202, 214, 238, 1)',
|
|
30923
30839
|
selectedStroke: 'rgba(132, 152, 169, 1)',
|
|
30924
|
-
selectedStrokeWidth: 3,
|
|
30925
30840
|
selectedHoverFill: 'rgba(202, 214, 238, 1)',
|
|
30926
30841
|
selectedHoverStroke: 'rgba(132, 152, 169, 1)',
|
|
30927
|
-
selectedHoverStrokeWidth: 3,
|
|
30928
30842
|
isolatedFill: 'rgba(225, 227, 233, 1)',
|
|
30929
30843
|
isolatedStroke: 'rgba(189, 198, 208, 1)',
|
|
30930
|
-
isolatedStrokeWidth: 2,
|
|
30931
30844
|
};
|
|
30932
30845
|
/** H5 端地块配色 */
|
|
30933
30846
|
const PARTITION_PICKER_COLORS_H5 = {
|
|
30934
30847
|
defaultFill: 'rgba(222, 225, 231, 1)',
|
|
30935
30848
|
defaultStroke: 'rgba(132, 152, 169, 1)',
|
|
30936
|
-
defaultStrokeWidth: 1,
|
|
30937
30849
|
hoverFill: 'rgba(222, 225, 231, 1)',
|
|
30938
30850
|
hoverStroke: 'rgba(132, 152, 169, 1)',
|
|
30939
|
-
hoverStrokeWidth: 1,
|
|
30940
30851
|
selectedFill: 'rgba(202, 214, 238, 1)',
|
|
30941
30852
|
selectedStroke: 'rgba(132, 152, 169, 1)',
|
|
30942
|
-
selectedStrokeWidth: 1,
|
|
30943
30853
|
selectedHoverFill: 'rgba(202, 214, 238, 1)',
|
|
30944
30854
|
selectedHoverStroke: 'rgba(132, 152, 169, 1)',
|
|
30945
|
-
selectedHoverStrokeWidth: 1,
|
|
30946
30855
|
isolatedFill: 'rgba(225, 227, 233, 1)',
|
|
30947
30856
|
isolatedStroke: 'rgba(189, 198, 208, 1)',
|
|
30948
|
-
isolatedStrokeWidth: 1,
|
|
30949
30857
|
};
|
|
30950
30858
|
function getPartitionPickerMapConfig(platform = exports.PlatformType.WEB) {
|
|
30951
30859
|
return platform === exports.PlatformType.WEB
|
|
@@ -30955,6 +30863,11 @@ function getPartitionPickerMapConfig(platform = exports.PlatformType.WEB) {
|
|
|
30955
30863
|
function getPartitionPickerColors(platform = exports.PlatformType.WEB) {
|
|
30956
30864
|
return platform === exports.PlatformType.WEB ? PARTITION_PICKER_COLORS_WEB : PARTITION_PICKER_COLORS_H5;
|
|
30957
30865
|
}
|
|
30866
|
+
function getPartitionPickerBoundaryStrokePx(platform = exports.PlatformType.WEB) {
|
|
30867
|
+
return platform === exports.PlatformType.WEB
|
|
30868
|
+
? { ...WEB_PARTITION_BOUNDARY_STROKE_PX }
|
|
30869
|
+
: { ...H5_PARTITION_BOUNDARY_STROKE_PX };
|
|
30870
|
+
}
|
|
30958
30871
|
/** Web 分区名气泡(Figma「地块名称」/ 选中区域) */
|
|
30959
30872
|
const PARTITION_PICKER_LABEL_STYLES_WEB = {
|
|
30960
30873
|
default: {
|
|
@@ -30995,6 +30908,7 @@ const PARTITION_PICKER_LABEL_STYLES_H5 = {
|
|
|
30995
30908
|
fontWeight: 400,
|
|
30996
30909
|
padding: '6px',
|
|
30997
30910
|
width: `${H5_PARTITION_LABEL_WIDTH_PX}px`,
|
|
30911
|
+
maxWidth: `${H5_PARTITION_LABEL_WIDTH_PX}px`,
|
|
30998
30912
|
borderRadius: 100,
|
|
30999
30913
|
boxSizing: 'border-box',
|
|
31000
30914
|
},
|
|
@@ -31005,6 +30919,7 @@ const PARTITION_PICKER_LABEL_STYLES_H5 = {
|
|
|
31005
30919
|
fontWeight: 400,
|
|
31006
30920
|
padding: '6px',
|
|
31007
30921
|
width: `${H5_PARTITION_LABEL_WIDTH_PX}px`,
|
|
30922
|
+
maxWidth: `${H5_PARTITION_LABEL_WIDTH_PX}px`,
|
|
31008
30923
|
borderRadius: 100,
|
|
31009
30924
|
boxSizing: 'border-box',
|
|
31010
30925
|
},
|
|
@@ -31042,10 +30957,6 @@ const DEFAULT_PARTITION_PICKER_GRID_STYLE = {
|
|
|
31042
30957
|
opacity: PARTITION_PICKER_GRID_OPACITY,
|
|
31043
30958
|
maxIntersectionDots: PARTITION_PICKER_GRID_MAX_INTERSECTION_DOTS,
|
|
31044
30959
|
};
|
|
31045
|
-
const DEFAULT_PARTITION_PICKER_BOUNDARY_STROKE_PX = {
|
|
31046
|
-
default: PARTITION_BOUNDARY_TARGET_SCREEN_STROKE_PX,
|
|
31047
|
-
emphasized: PARTITION_BOUNDARY_EMPHASIZED_TARGET_SCREEN_STROKE_PX,
|
|
31048
|
-
};
|
|
31049
30960
|
/**
|
|
31050
30961
|
* 将 platform 内置默认值与外部 pickerStyleConfig 深度合并。
|
|
31051
30962
|
* 调用方只需覆盖变化的字段,无需改组件源码。
|
|
@@ -31062,8 +30973,7 @@ function resolvePartitionPickerStyles(platform = exports.PlatformType.WEB, confi
|
|
|
31062
30973
|
}
|
|
31063
30974
|
: baseLabels,
|
|
31064
30975
|
grid: merge$1({}, DEFAULT_PARTITION_PICKER_GRID_STYLE, config?.grid),
|
|
31065
|
-
boundaryStrokePx: merge$1({},
|
|
31066
|
-
labelMinScreenWidthPx: config?.labelMinScreenWidthPx ?? H5_PARTITION_LABEL_MIN_SCREEN_WIDTH_PX,
|
|
30976
|
+
boundaryStrokePx: merge$1({}, getPartitionPickerBoundaryStrokePx(platform), config?.boundaryStrokePx),
|
|
31067
30977
|
};
|
|
31068
30978
|
}
|
|
31069
30979
|
|
|
@@ -31077,7 +30987,7 @@ function resolvePartitionPickerStyles(platform = exports.PlatformType.WEB, confi
|
|
|
31077
30987
|
*
|
|
31078
30988
|
* 平移可在地块/分区名等任意区域发起;仅当位移小于阈值时才视为点击
|
|
31079
30989
|
*/
|
|
31080
|
-
function useMapViewport({ mapJson, containerRef: externalContainerRef, width, height, padding, minZoom = 0.5, maxZoom =
|
|
30990
|
+
function useMapViewport({ mapJson, containerRef: externalContainerRef, width, height, padding, minZoom = 0.5, maxZoom = 3, enablePanZoom = true, refitOnResize = true, onViewportTap, mapRotationDeg = 0, }) {
|
|
31081
30991
|
/** 地图容器 DOM,用于绑定 wheel/pointer/touch 事件 */
|
|
31082
30992
|
const internalContainerRef = React.useRef(null);
|
|
31083
30993
|
const containerRef = externalContainerRef ?? internalContainerRef;
|
|
@@ -31496,7 +31406,17 @@ function useMapViewport({ mapJson, containerRef: externalContainerRef, width, he
|
|
|
31496
31406
|
window.removeEventListener('mouseup', handleWindowPointerUp);
|
|
31497
31407
|
window.removeEventListener('blur', handleWindowPointerUp);
|
|
31498
31408
|
};
|
|
31499
|
-
}, [
|
|
31409
|
+
}, [
|
|
31410
|
+
applyPan,
|
|
31411
|
+
applyZoom,
|
|
31412
|
+
clearPanState,
|
|
31413
|
+
enablePanZoom,
|
|
31414
|
+
height,
|
|
31415
|
+
maxZoom,
|
|
31416
|
+
minZoom,
|
|
31417
|
+
scheduleViewBox,
|
|
31418
|
+
width,
|
|
31419
|
+
]);
|
|
31500
31420
|
return {
|
|
31501
31421
|
/** 绑定到地图外层容器的 ref */
|
|
31502
31422
|
containerRef,
|
|
@@ -31899,19 +31819,16 @@ function usePartitionLabelItems(mapData, viewBox, containerWidth, containerHeigh
|
|
|
31899
31819
|
]);
|
|
31900
31820
|
}
|
|
31901
31821
|
|
|
31902
|
-
var css_248z = "@charset \"UTF-8\";\n/* 地图容器:裁剪溢出,禁用浏览器默认 touch 手势以便自定义 pinch */\n.index-module_container__nNYv7 {\n position: relative;\n overflow: hidden;\n touch-action: none;\n user-select: none;\n cursor: grab;\n /* H5 点击时不出现矩形 tap 高亮 */\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/* 网格 + 地块双层 SVG 叠放,共用 viewBox 保证平移/缩放同步 */\n.index-module_mapSvgStack__nz2s2 {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 1;\n}\n\n.index-module_gridSvg__MoJD6 {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n}\n\n/* 地图 SVG:地块/通道,可绕 viewBox 中心旋转 */\n.index-module_mapSvg__vN0LV {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/* 可点击地块:点击选中由 viewport 统一处理,此处保留 hover */\n.index-module_boundaryPolygon__uHe-E {\n cursor: grab;\n pointer-events: auto;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n outline: none;\n -webkit-touch-callout: none;\n}\n\n.index-module_container__nNYv7:active {\n cursor: grabbing;\n}\n\n.index-module_boundaryPolygon__uHe-E:active {\n cursor: grabbing;\n}\n\n/* Map 模式:OverlayViewF 内根节点,铺满 overlay 像素区域 */\n.index-module_googleOverlayRoot__TQ3II {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: visible;\n}\n\n/* HTML overlay 层:CSS rotate 与 MowerMapRenderer OverlayViewF 一致,子元素自行反向补偿 */\n.index-module_mapOverlayLayer__7jTDy {\n position: absolute;\n inset: 0;\n transform-origin: 50% 50%;\n pointer-events: none;\n z-index: 2;\n}\n\n/* 分区名气泡层,绝对定位覆盖在 SVG 之上 */\n.index-module_labelsLayer__Rcikw {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n.index-module_label__xo3Kc {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n pointer-events: auto;\n cursor: grab;\n white-space: nowrap;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n outline: none;\n -webkit-touch-callout: none;\n}\n\n.index-module_label__xo3Kc:active {\n cursor: grabbing;\n}\n\n.index-
|
|
31903
|
-
var styles = {"container":"index-module_container__nNYv7","mapSvgStack":"index-module_mapSvgStack__nz2s2","gridSvg":"index-module_gridSvg__MoJD6","mapSvg":"index-module_mapSvg__vN0LV","boundaryPolygon":"index-module_boundaryPolygon__uHe-E","googleOverlayRoot":"index-module_googleOverlayRoot__TQ3II","mapOverlayLayer":"index-module_mapOverlayLayer__7jTDy","labelsLayer":"index-module_labelsLayer__Rcikw","label":"index-module_label__xo3Kc","
|
|
31822
|
+
var css_248z = "@charset \"UTF-8\";\n/* 地图容器:裁剪溢出,禁用浏览器默认 touch 手势以便自定义 pinch */\n.index-module_container__nNYv7 {\n position: relative;\n overflow: hidden;\n touch-action: none;\n user-select: none;\n cursor: grab;\n /* H5 点击时不出现矩形 tap 高亮 */\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/* 网格 + 地块双层 SVG 叠放,共用 viewBox 保证平移/缩放同步 */\n.index-module_mapSvgStack__nz2s2 {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 1;\n}\n\n.index-module_gridSvg__MoJD6 {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n}\n\n/* 地图 SVG:地块/通道,可绕 viewBox 中心旋转 */\n.index-module_mapSvg__vN0LV {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/* 可点击地块:点击选中由 viewport 统一处理,此处保留 hover */\n.index-module_boundaryPolygon__uHe-E {\n cursor: grab;\n pointer-events: auto;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n outline: none;\n -webkit-touch-callout: none;\n}\n\n.index-module_container__nNYv7:active {\n cursor: grabbing;\n}\n\n.index-module_boundaryPolygon__uHe-E:active {\n cursor: grabbing;\n}\n\n/* Map 模式:OverlayViewF 内根节点,铺满 overlay 像素区域 */\n.index-module_googleOverlayRoot__TQ3II {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: visible;\n}\n\n/* HTML overlay 层:CSS rotate 与 MowerMapRenderer OverlayViewF 一致,子元素自行反向补偿 */\n.index-module_mapOverlayLayer__7jTDy {\n position: absolute;\n inset: 0;\n transform-origin: 50% 50%;\n pointer-events: none;\n z-index: 2;\n}\n\n/* 分区名气泡层,绝对定位覆盖在 SVG 之上 */\n.index-module_labelsLayer__Rcikw {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n.index-module_label__xo3Kc {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n pointer-events: auto;\n cursor: grab;\n white-space: nowrap;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n outline: none;\n -webkit-touch-callout: none;\n}\n\n.index-module_label__xo3Kc:active {\n cursor: grabbing;\n}\n\n.index-module_labelOrderOnly__TDLBU {\n gap: 0;\n}\n\n/* H5 名称标签:气泡宽度 / 文案最大宽度由 constants.ts 内联样式控制 */\n.index-module_labelH5Wrap__Es5cA {\n white-space: normal;\n}\n\n.index-module_labelPill__7jnOo {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: none;\n}\n\n.index-module_labelPillH5__iPeHi {\n box-sizing: border-box;\n}\n\n.index-module_labelText__ialST {\n word-break: break-word;\n text-align: center;\n}\n\n.index-module_labelTextH5__jz8SO {\n max-width: 100%;\n white-space: normal;\n overflow-wrap: anywhere;\n line-height: 1.33;\n}\n\n/* 选中序号徽章:尺寸与颜色由 constants 按 platform 注入 */\n.index-module_selectionOrderBadge__uj7LX {\n flex-shrink: 0;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.index-module_boundaryPolygonIsolated__syN4V {\n cursor: not-allowed;\n}\n\n.index-module_boundaryPolygonIsolated__syN4V:active {\n cursor: grabbing;\n}\n\n.index-module_labelIsolated__K3WAB {\n cursor: not-allowed;\n pointer-events: auto;\n}\n\n.index-module_labelIsolated__K3WAB:active {\n cursor: grabbing;\n}\n\n.index-module_labelIsolatedLayout__k-rwI {\n gap: 4px;\n}\n\n.index-module_isolatedIconBelow__PuVIF {\n position: static;\n transform: none;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n pointer-events: none;\n}\n\n.index-module_isolatedIconBelow__PuVIF.index-module_isolatedIconWeb__iPkYp {\n width: 20px;\n height: 20px;\n}\n\n.index-module_isolatedIcon__Vbxl0 {\n position: absolute;\n width: 24px;\n height: 24px;\n left: 50%;\n bottom: calc(100% + 4px);\n transform: translateX(-50%);\n}\n\n.index-module_isolatedIconWeb__iPkYp {\n width: 20px;\n height: 20px;\n bottom: calc(100% + 2px);\n}";
|
|
31823
|
+
var styles = {"container":"index-module_container__nNYv7","mapSvgStack":"index-module_mapSvgStack__nz2s2","gridSvg":"index-module_gridSvg__MoJD6","mapSvg":"index-module_mapSvg__vN0LV","boundaryPolygon":"index-module_boundaryPolygon__uHe-E","googleOverlayRoot":"index-module_googleOverlayRoot__TQ3II","mapOverlayLayer":"index-module_mapOverlayLayer__7jTDy","labelsLayer":"index-module_labelsLayer__Rcikw","label":"index-module_label__xo3Kc","labelOrderOnly":"index-module_labelOrderOnly__TDLBU","labelH5Wrap":"index-module_labelH5Wrap__Es5cA","labelPill":"index-module_labelPill__7jnOo","labelPillH5":"index-module_labelPillH5__iPeHi","labelText":"index-module_labelText__ialST","labelTextH5":"index-module_labelTextH5__jz8SO","selectionOrderBadge":"index-module_selectionOrderBadge__uj7LX","boundaryPolygonIsolated":"index-module_boundaryPolygonIsolated__syN4V","labelIsolated":"index-module_labelIsolated__K3WAB","labelIsolatedLayout":"index-module_labelIsolatedLayout__k-rwI","isolatedIconBelow":"index-module_isolatedIconBelow__PuVIF","isolatedIconWeb":"index-module_isolatedIconWeb__iPkYp"};
|
|
31904
31824
|
styleInject(css_248z);
|
|
31905
31825
|
|
|
31906
31826
|
const PARTITION_BOUNDARY_ID_ATTR$1 = 'data-partition-boundary-id';
|
|
31907
|
-
const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isIsolated = false, selected, hovered, viewBoxWidth, viewBoxHeight,
|
|
31827
|
+
const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isIsolated = false, selected, hovered, viewBoxWidth, viewBoxHeight, containerWidth, containerHeight, onHoverChange, onBoundaryClick, }) => {
|
|
31908
31828
|
const style = data.style || {};
|
|
31909
31829
|
const boundaryId = Number(data.id);
|
|
31910
31830
|
const colors = boundaryColors;
|
|
31911
|
-
const strokePx = boundaryStrokePx ?? {
|
|
31912
|
-
default: PARTITION_BOUNDARY_TARGET_SCREEN_STROKE_PX,
|
|
31913
|
-
emphasized: PARTITION_BOUNDARY_EMPHASIZED_TARGET_SCREEN_STROKE_PX,
|
|
31914
|
-
};
|
|
31831
|
+
const strokePx = boundaryStrokePx ?? { ...WEB_PARTITION_BOUNDARY_STROKE_PX };
|
|
31915
31832
|
const pointsString = React.useMemo(() => data.points.map((point) => `${point[0]},${point[1]}`).join(' '), [data.points]);
|
|
31916
31833
|
const fillColor = React.useMemo(() => {
|
|
31917
31834
|
if (isIsolated)
|
|
@@ -31934,31 +31851,16 @@ const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isI
|
|
|
31934
31851
|
return style.lineColor || colors.defaultStroke;
|
|
31935
31852
|
}, [colors, hovered, isIsolated, selected, style.lineColor]);
|
|
31936
31853
|
const strokeWidth = React.useMemo(() => {
|
|
31937
|
-
let baseWidth;
|
|
31938
|
-
let emphasized = false;
|
|
31939
|
-
if (isIsolated)
|
|
31940
|
-
baseWidth = colors.isolatedStrokeWidth;
|
|
31941
|
-
else if (selected) {
|
|
31942
|
-
emphasized = true;
|
|
31943
|
-
baseWidth = hovered ? colors.selectedHoverStrokeWidth : colors.selectedStrokeWidth;
|
|
31944
|
-
}
|
|
31945
|
-
else if (hovered) {
|
|
31946
|
-
emphasized = true;
|
|
31947
|
-
baseWidth = colors.hoverStrokeWidth;
|
|
31948
|
-
}
|
|
31949
|
-
else
|
|
31950
|
-
baseWidth = colors.defaultStrokeWidth;
|
|
31951
31854
|
const viewBox = { width: viewBoxWidth, height: viewBoxHeight };
|
|
31952
|
-
|
|
31855
|
+
const targetScreenStrokePx = !isIsolated && (selected || hovered) ? strokePx.selected : strokePx.default;
|
|
31856
|
+
return scaleStrokeWidthForViewBox(viewBox, {
|
|
31953
31857
|
containerWidth,
|
|
31954
31858
|
containerHeight,
|
|
31955
|
-
|
|
31859
|
+
targetScreenStrokePx,
|
|
31956
31860
|
});
|
|
31957
31861
|
}, [
|
|
31958
|
-
colors,
|
|
31959
31862
|
containerHeight,
|
|
31960
31863
|
containerWidth,
|
|
31961
|
-
fitViewBox,
|
|
31962
31864
|
hovered,
|
|
31963
31865
|
isIsolated,
|
|
31964
31866
|
selected,
|
|
@@ -31978,7 +31880,7 @@ const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isI
|
|
|
31978
31880
|
};
|
|
31979
31881
|
var SelectableBoundaryElement$1 = React.memo(SelectableBoundaryElement);
|
|
31980
31882
|
|
|
31981
|
-
const PartitionPickerSvg = ({ svgElementDatas, viewBox,
|
|
31883
|
+
const PartitionPickerSvg = ({ svgElementDatas, viewBox, containerWidth, containerHeight, mapRotation = 0, boundaryColors, boundaryStrokePx, isolatedBoundaryIds, selectedIds, hoveredId, onHoverChange, onBoundaryClick, }) => {
|
|
31982
31884
|
const boundaries = (svgElementDatas[exports.DataType.BOUNDARY] || []);
|
|
31983
31885
|
const channels = (svgElementDatas[exports.DataType.CHANNEL] || []);
|
|
31984
31886
|
const selectedIdSet = React.useMemo(() => new Set(selectedIds), [selectedIds]);
|
|
@@ -31990,7 +31892,7 @@ const PartitionPickerSvg = ({ svgElementDatas, viewBox, fitViewBox, containerWid
|
|
|
31990
31892
|
}, [mapRotation, viewBox.x, viewBox.y, viewBox.width, viewBox.height]);
|
|
31991
31893
|
const mapContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(GElement, { type: "boundary", children: boundaries.map((item) => {
|
|
31992
31894
|
const boundaryId = Number(item.id);
|
|
31993
|
-
return (jsxRuntime.jsx(SelectableBoundaryElement$1, { data: item, boundaryColors: boundaryColors, boundaryStrokePx: boundaryStrokePx, isIsolated: isolatedBoundaryIds.has(boundaryId), selected: selectedIdSet.has(boundaryId), hovered: hoveredId === boundaryId, viewBoxWidth: viewBox.width, viewBoxHeight: viewBox.height,
|
|
31895
|
+
return (jsxRuntime.jsx(SelectableBoundaryElement$1, { data: item, boundaryColors: boundaryColors, boundaryStrokePx: boundaryStrokePx, isIsolated: isolatedBoundaryIds.has(boundaryId), selected: selectedIdSet.has(boundaryId), hovered: hoveredId === boundaryId, viewBoxWidth: viewBox.width, viewBoxHeight: viewBox.height, containerWidth: containerWidth, containerHeight: containerHeight, onHoverChange: onHoverChange, onBoundaryClick: onBoundaryClick }, item.id));
|
|
31994
31896
|
}) }), jsxRuntime.jsxs(GElement, { type: "channel", children: [jsxRuntime.jsx(ChannelClipPath, {}), channels.map((item) => (jsxRuntime.jsx(ChannelElement, { data: item }, item.id)))] })] }));
|
|
31995
31897
|
return (jsxRuntime.jsx("svg", { className: styles.mapSvg, xmlns: "http://www.w3.org/2000/svg", viewBox: viewBoxToString(viewBox), width: "100%", height: "100%", preserveAspectRatio: "xMidYMid meet", shapeRendering: "geometricPrecision", children: mapContentTransform ? (jsxRuntime.jsx("g", { transform: mapContentTransform, children: mapContent })) : (mapContent) }));
|
|
31996
31898
|
};
|
|
@@ -32030,10 +31932,21 @@ const MapGridBackground = ({ viewBox, gridStyle }) => {
|
|
|
32030
31932
|
var MapGridBackground$1 = React.memo(MapGridBackground);
|
|
32031
31933
|
|
|
32032
31934
|
const PartitionPickerGridSvg = ({ viewBox, gridStyle }) => {
|
|
32033
|
-
return (jsxRuntime.jsx("svg", { className: styles.gridSvg, "data-viewport-background": "true", xmlns: "http://www.w3.org/2000/svg", viewBox: viewBoxToString(viewBox), width: "100%", height: "100%",
|
|
31935
|
+
return (jsxRuntime.jsx("svg", { className: styles.gridSvg, "data-viewport-background": "true", xmlns: "http://www.w3.org/2000/svg", viewBox: viewBoxToString(viewBox), width: "100%", height: "100%",
|
|
31936
|
+
// 设置缩放的规则
|
|
31937
|
+
//等比缩放 viewBox 内容,使其完整落在容器内;
|
|
31938
|
+
//水平、垂直都居中;
|
|
31939
|
+
//比例不一致时,上下或左右留空(letterboxing),不裁切、不拉伸变形。
|
|
31940
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
31941
|
+
/**
|
|
31942
|
+
* 控制浏览器如何绘制路径/线条:
|
|
31943
|
+
* geometricPrecision:优先几何精度,线条更平滑、对齐更稳,缩放时不易发虚或抖动。
|
|
31944
|
+
* 网格是大量细线,用这个属性能让缩放/平移时网格更清晰稳定。
|
|
31945
|
+
*/
|
|
31946
|
+
shapeRendering: "geometricPrecision", "aria-hidden": true, children: jsxRuntime.jsx(MapGridBackground$1, { viewBox: viewBox, gridStyle: gridStyle }) }));
|
|
32034
31947
|
};
|
|
32035
31948
|
|
|
32036
|
-
const PartitionNameLabels = ({ items, selectedIds, labelStyles,
|
|
31949
|
+
const PartitionNameLabels = ({ items, selectedIds, labelStyles, platform = exports.PlatformType.WEB, showSelectionOrder = false, rotation = 0, onHoverChange, onBoundaryClick, }) => {
|
|
32037
31950
|
const isWeb = platform === exports.PlatformType.WEB;
|
|
32038
31951
|
const orderBadgeStyle = React.useMemo(() => ({
|
|
32039
31952
|
width: labelStyles.selectionOrderBadge.width,
|
|
@@ -32043,18 +31956,18 @@ const PartitionNameLabels = ({ items, selectedIds, labelStyles, labelMinScreenWi
|
|
|
32043
31956
|
color: labelStyles.selectionOrderBadge.color,
|
|
32044
31957
|
fontSize: `${labelStyles.selectionOrderBadge.fontSize}px`,
|
|
32045
31958
|
fontWeight: labelStyles.selectionOrderBadge.fontWeight,
|
|
31959
|
+
fontFamily: labelStyles.selectionOrderBadge.fontFamily,
|
|
32046
31960
|
lineHeight: labelStyles.selectionOrderBadge.lineHeight,
|
|
32047
31961
|
}), [labelStyles]);
|
|
32048
31962
|
return (jsxRuntime.jsx("div", { className: styles.labelsLayer, children: items.map((item) => {
|
|
32049
31963
|
const isIsolated = item.isIsolated === true;
|
|
32050
31964
|
const selected = !isIsolated && selectedIds.includes(item.id);
|
|
32051
31965
|
const selectionOrder = selected ? selectedIds.indexOf(item.id) + 1 : null;
|
|
32052
|
-
const isLargeEnough = item.screenWidthPx >
|
|
31966
|
+
const isLargeEnough = item.screenWidthPx > H5_PARTITION_LABEL_MIN_SCREEN_WIDTH_PX;
|
|
32053
31967
|
// Web 始终展示名称;H5 按屏幕宽度决定
|
|
32054
31968
|
const showNameLabel = isWeb || isLargeEnough;
|
|
32055
31969
|
const showOrderBadge = showSelectionOrder && selected && selectionOrder != null;
|
|
32056
31970
|
const h5OrderOnly = !isWeb && showOrderBadge && !isLargeEnough;
|
|
32057
|
-
const h5OrderWithName = !isWeb && showOrderBadge && isLargeEnough;
|
|
32058
31971
|
if (!showNameLabel && !showOrderBadge && !isIsolated) {
|
|
32059
31972
|
return null;
|
|
32060
31973
|
}
|
|
@@ -32063,18 +31976,21 @@ const PartitionNameLabels = ({ items, selectedIds, labelStyles, labelMinScreenWi
|
|
|
32063
31976
|
styles.label,
|
|
32064
31977
|
!isWeb && showNameLabel ? styles.labelH5Wrap : '',
|
|
32065
31978
|
isIsolated ? styles.labelIsolated : '',
|
|
32066
|
-
isWeb && showOrderBadge ? styles.labelWithOrder : '',
|
|
32067
|
-
h5OrderWithName ? styles.labelWithOrderH5 : '',
|
|
32068
31979
|
h5OrderOnly ? styles.labelOrderOnly : '',
|
|
32069
31980
|
isIsolated ? styles.labelIsolatedLayout : '',
|
|
32070
31981
|
]
|
|
32071
31982
|
.filter(Boolean)
|
|
32072
31983
|
.join(' ');
|
|
31984
|
+
const showOrderWithName = showOrderBadge && showNameLabel;
|
|
31985
|
+
const selectionOrderGapPx = isWeb
|
|
31986
|
+
? WEB_SELECTION_ORDER_GAP_PX
|
|
31987
|
+
: H5_SELECTION_ORDER_GAP_PX;
|
|
32073
31988
|
const boundaryIdProps = isIsolated ? {} : { [PARTITION_BOUNDARY_ID_ATTR$1]: item.id };
|
|
32074
31989
|
return (jsxRuntime.jsxs("div", { className: labelClassName, style: {
|
|
32075
31990
|
left: `${item.leftPct}%`,
|
|
32076
31991
|
top: `${item.topPct}%`,
|
|
32077
31992
|
transform: `translate(-50%, -50%) rotate(${-rotation}deg)`,
|
|
31993
|
+
...(showOrderWithName ? { gap: selectionOrderGapPx } : undefined),
|
|
32078
31994
|
}, ...boundaryIdProps, onMouseEnter: isIsolated ? undefined : () => onHoverChange(item.id), onMouseLeave: isIsolated ? undefined : () => onHoverChange(null), onClick: onBoundaryClick && !isIsolated
|
|
32079
31995
|
? (event) => {
|
|
32080
31996
|
event.stopPropagation();
|
|
@@ -32089,7 +32005,7 @@ const DEFAULT_BACKGROUND = PARTITION_PICKER_GRID_BASE_COLOR;
|
|
|
32089
32005
|
const PARTITION_BOUNDARY_ID_ATTR = 'data-partition-boundary-id';
|
|
32090
32006
|
/** Map 模式下 OverlayViewF 默认 z-index */
|
|
32091
32007
|
const DEFAULT_OVERLAY_Z_INDEX = 100;
|
|
32092
|
-
const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerStyleConfig, sn = '', platform = exports.PlatformType.WEB, width, height, padding =
|
|
32008
|
+
const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerStyleConfig, sn = '', platform = exports.PlatformType.WEB, width, height, padding = 0, backgroundColor = DEFAULT_BACKGROUND, defaultTransform, mapRef, minZoom = 0.5, maxZoom = 3, enablePanZoom = true, refitOnResize = true, onSizeChange, selectedBoundaryIds, defaultSelectedBoundaryIds, onSelectionChange, hoveredBoundaryId, defaultHoveredBoundaryId, onBoundaryHoverChange, showSelectionOrder = false, zIndex = DEFAULT_OVERLAY_Z_INDEX, className, style, }, ref) => {
|
|
32093
32009
|
/**
|
|
32094
32010
|
* 是否为 Map 模式(传入 mapRef 时为 true):
|
|
32095
32011
|
* - true:Google Maps 底图 + OverlayViewF,平移/缩放/fit 由底图负责
|
|
@@ -32100,8 +32016,34 @@ const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerSt
|
|
|
32100
32016
|
const channelClipPathId = React.useMemo(() => createChannelClipPathId({ sn, reactId: reactInstanceId }), [sn, reactInstanceId]);
|
|
32101
32017
|
/** 外部 pickerStyleConfig 与内置 platform 默认值合并后的最终外观(地块/标签/网格等) */
|
|
32102
32018
|
const mergedPickerStyles = React.useMemo(() => resolvePartitionPickerStyles(platform, pickerStyleConfig), [pickerStyleConfig, platform]);
|
|
32103
|
-
/** Standalone
|
|
32104
|
-
const resolvedBackgroundColor =
|
|
32019
|
+
/** Standalone 容器背景与 grid.baseColor 对齐(合并后的最终值) */
|
|
32020
|
+
const resolvedBackgroundColor = React.useMemo(() => {
|
|
32021
|
+
if (isMapMode)
|
|
32022
|
+
return undefined;
|
|
32023
|
+
if (pickerStyleConfig?.grid?.baseColor != null) {
|
|
32024
|
+
return mergedPickerStyles.grid.baseColor;
|
|
32025
|
+
}
|
|
32026
|
+
return backgroundColor ?? mergedPickerStyles.grid.baseColor;
|
|
32027
|
+
}, [
|
|
32028
|
+
backgroundColor,
|
|
32029
|
+
isMapMode,
|
|
32030
|
+
mergedPickerStyles.grid.baseColor,
|
|
32031
|
+
pickerStyleConfig?.grid?.baseColor,
|
|
32032
|
+
]);
|
|
32033
|
+
/** Standalone 网格层:backgroundColor 未显式指定 grid.baseColor 时与容器背景同步 */
|
|
32034
|
+
const standaloneGridStyle = React.useMemo(() => {
|
|
32035
|
+
if (pickerStyleConfig?.grid?.baseColor != null) {
|
|
32036
|
+
return mergedPickerStyles.grid;
|
|
32037
|
+
}
|
|
32038
|
+
if (backgroundColor != null) {
|
|
32039
|
+
return { ...mergedPickerStyles.grid, baseColor: backgroundColor };
|
|
32040
|
+
}
|
|
32041
|
+
return mergedPickerStyles.grid;
|
|
32042
|
+
}, [
|
|
32043
|
+
backgroundColor,
|
|
32044
|
+
mergedPickerStyles.grid,
|
|
32045
|
+
pickerStyleConfig?.grid?.baseColor,
|
|
32046
|
+
]);
|
|
32105
32047
|
const mergedMapConfig = React.useMemo(() => merge$1({}, DEFAULT_STYLES, getPartitionPickerMapConfig(platform), mapConfig), [mapConfig, platform]);
|
|
32106
32048
|
const svgElementDatas = React.useMemo(() => UnifiedMapDataProcessor.processMapData(mapJson, mergedMapConfig) || {}, [mapJson, mergedMapConfig]);
|
|
32107
32049
|
/** 地图 Y 轴相对正北的偏移(度),与 MowerMapRenderer.originNorthRotate 一致 */
|
|
@@ -32176,7 +32118,7 @@ const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerSt
|
|
|
32176
32118
|
}
|
|
32177
32119
|
}, [isMapMode, isReady, onSizeChange, pxWidth, pxHeight]);
|
|
32178
32120
|
/** Standalone:平移/缩放 viewBox;Map 模式 enablePanZoom 关闭,仅保留 hook 结构 */
|
|
32179
|
-
const { viewBox: standaloneViewBox, gridViewBox,
|
|
32121
|
+
const { viewBox: standaloneViewBox, gridViewBox, resetView: standaloneResetView, fitToView: standaloneFitToView, } = useMapViewport({
|
|
32180
32122
|
mapJson,
|
|
32181
32123
|
containerRef,
|
|
32182
32124
|
width: pxWidth,
|
|
@@ -32191,7 +32133,6 @@ const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerSt
|
|
|
32191
32133
|
});
|
|
32192
32134
|
/** 按模式选取 viewBox / 尺寸 / 旋转 / 就绪状态(Map 与 Standalone 数据源不同) */
|
|
32193
32135
|
const viewBox = isMapMode ? googleOverlay.svgViewBox : standaloneViewBox;
|
|
32194
|
-
const fitViewBox = isMapMode ? googleOverlay.fitViewBox : standaloneFitViewBox;
|
|
32195
32136
|
const overlayWidth = isMapMode ? googleOverlay.overlayWidth : pxWidth;
|
|
32196
32137
|
const overlayHeight = isMapMode ? googleOverlay.overlayHeight : pxHeight;
|
|
32197
32138
|
const actureRotate = isMapMode ? googleOverlay.actureRotate : standaloneActureRotate;
|
|
@@ -32265,18 +32206,18 @@ const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerSt
|
|
|
32265
32206
|
...(isMapMode ? {} : layoutStyle),
|
|
32266
32207
|
}), [isMapMode, layoutStyle, resolvedBackgroundColor, style]);
|
|
32267
32208
|
/** 地块 + 通道 SVG;Map 模式不在 SVG 内旋转(由 OverlayViewF rotate 处理) */
|
|
32268
|
-
const mapSvgLayer = viewBox && isLayersReady ? (jsxRuntime.jsx(PartitionPickerSvg, { svgElementDatas: svgElementDatas, viewBox: viewBox,
|
|
32209
|
+
const mapSvgLayer = viewBox && isLayersReady ? (jsxRuntime.jsx(PartitionPickerSvg, { svgElementDatas: svgElementDatas, viewBox: viewBox, containerWidth: overlayWidth, containerHeight: overlayHeight, mapRotation: isMapMode ? 0 : actureRotate, boundaryColors: mergedPickerStyles.boundary, boundaryStrokePx: mergedPickerStyles.boundaryStrokePx, isolatedBoundaryIds: isolatedBoundaryIds, selectedIds: selectedIds, hoveredId: hoveredId, onHoverChange: handleHoverChange, onBoundaryClick: isMapMode ? handleBoundaryClick : undefined })) : null;
|
|
32269
32210
|
/**
|
|
32270
32211
|
* 分区标签 + 充电桩 HTML 层。
|
|
32271
32212
|
* Map 模式:平铺于 overlay 根节点;Standalone:包在 mapOverlayLayer 内做 CSS 旋转。
|
|
32272
32213
|
*/
|
|
32273
|
-
const overlayLayers = viewBox && isLayersReady ? (isMapMode ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels,
|
|
32214
|
+
const overlayLayers = viewBox && isLayersReady ? (isMapMode ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels, platform: platform, showSelectionOrder: showSelectionOrder, rotation: actureRotate, onHoverChange: handleHoverChange, onBoundaryClick: handleBoundaryClick }), jsxRuntime.jsx(CharginPile, { viewBox: viewBox, rotation: actureRotate })] })) : (jsxRuntime.jsxs("div", { className: styles.mapOverlayLayer, style: mapOverlayLayerStyle, children: [jsxRuntime.jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels, platform: platform, showSelectionOrder: showSelectionOrder, rotation: actureRotate, onHoverChange: handleHoverChange }), jsxRuntime.jsx(CharginPile, { viewBox: viewBox, rotation: actureRotate, viewRotationMode: "overlay-parent", containerWidth: overlayWidth, containerHeight: overlayHeight, sizeInSvgUnits: true, minDisplaySizePx: PARTITION_PICKER_CHARGING_PILE_MIN_DISPLAY_PX })] }))) : null;
|
|
32274
32215
|
/** Map 模式:渲染 OverlayViewF,底图为 Google Maps */
|
|
32275
32216
|
if (isMapMode && mapRef) {
|
|
32276
32217
|
return (jsxRuntime.jsx(CommonContextProvider, { value: commonValue, children: jsxRuntime.jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxRuntime.jsx(OverlayViewF, { map: mapRef, mapPaneName: "overlayMouseTarget", bounds: googleOverlay.bounds ?? undefined, rotate: actureRotate, zIndex: zIndex, onDraw: googleOverlay.handleOverlayDraw, children: jsxRuntime.jsxs("div", { className: `${styles.googleOverlayRoot} ${className || ''}`, style: containerStyle, onMouseLeave: () => setHoveredId(null), children: [mapSvgLayer, overlayLayers] }) }) }) }));
|
|
32277
32218
|
}
|
|
32278
32219
|
/** Standalone 模式:固定容器 + 网格底图 + 双层 SVG / HTML overlay */
|
|
32279
|
-
return (jsxRuntime.jsx(CommonContextProvider, { value: commonValue, children: jsxRuntime.jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxRuntime.jsx("div", { ref: containerRef, className: `${styles.container} ${className || ''}`, "data-viewport-background": "true", style: containerStyle, onMouseLeave: () => setHoveredId(null), children: isLayersReady && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: styles.mapSvgStack, children: [jsxRuntime.jsx(PartitionPickerGridSvg, { viewBox: gridViewBox, gridStyle:
|
|
32220
|
+
return (jsxRuntime.jsx(CommonContextProvider, { value: commonValue, children: jsxRuntime.jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxRuntime.jsx("div", { ref: containerRef, className: `${styles.container} ${className || ''}`, "data-viewport-background": "true", style: containerStyle, onMouseLeave: () => setHoveredId(null), children: isLayersReady && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: styles.mapSvgStack, children: [jsxRuntime.jsx(PartitionPickerGridSvg, { viewBox: gridViewBox, gridStyle: standaloneGridStyle }), mapSvgLayer] }), overlayLayers] })) }) }) }));
|
|
32280
32221
|
});
|
|
32281
32222
|
MowerPartitionPickerMap.displayName = 'MowerPartitionPickerMap';
|
|
32282
32223
|
|