@fleet-frontend/mower-maps 0.2.0-beta.54 → 0.2.0-beta.56
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
CHANGED
|
@@ -22474,11 +22474,13 @@ const ChannelClipPath = React__default.memo(() => {
|
|
|
22474
22474
|
const boundaryData = svgElementDatas?.[DataType.BOUNDARY] || [];
|
|
22475
22475
|
const [minX, minY, maxX, maxY] = useMemo(() => {
|
|
22476
22476
|
const baseVal = svgViewBox;
|
|
22477
|
+
//.因为channel会有宽度,为了防止channel在边界会被截断,需要给边界留出一定的余量
|
|
22478
|
+
const padding = 20;
|
|
22477
22479
|
return [
|
|
22478
|
-
baseVal?.x || 0,
|
|
22479
|
-
baseVal?.y || 0,
|
|
22480
|
-
(baseVal?.x || 0) + (baseVal?.width || 0),
|
|
22481
|
-
(baseVal?.y || 0) + (baseVal?.height || 0),
|
|
22480
|
+
(baseVal?.x || 0) - padding,
|
|
22481
|
+
(baseVal?.y || 0) - padding,
|
|
22482
|
+
(baseVal?.x || 0) + (baseVal?.width || 0) + padding,
|
|
22483
|
+
(baseVal?.y || 0) + (baseVal?.height || 0) + padding,
|
|
22482
22484
|
];
|
|
22483
22485
|
}, [svgViewBox]);
|
|
22484
22486
|
/**
|
|
@@ -25257,7 +25259,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
25257
25259
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
25258
25260
|
const infoBoxHeight = 50 * overlayScale; // 信息框高度
|
|
25259
25261
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
25260
|
-
const scale = platform === PlatformType.H5 ?
|
|
25262
|
+
const scale = platform === PlatformType.H5 ? 1.8 * overlayScale : 3 * overlayScale;
|
|
25261
25263
|
const offsetLeft = 10 * scale;
|
|
25262
25264
|
return (jsxs(Fragment, { children: [showInfo && (jsx("foreignObject", { x: infoBoxX, y: infoBoxY, width: infoBoxWidth, height: infoBoxHeight, style: { textAlign: 'center' }, children: jsxs("div", { style: {
|
|
25263
25265
|
padding: `5px ${10 * overlayScale}px`,
|
|
@@ -25956,7 +25958,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
25956
25958
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
25957
25959
|
const infoBoxHeight = 40 * overlayScale; // 信息框高度
|
|
25958
25960
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
25959
|
-
const circleScale = 2 * overlayScale;
|
|
25961
|
+
const circleScale = platform === PlatformType.H5 ? 1.5 * overlayScale : 2 * overlayScale;
|
|
25960
25962
|
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", style: { cursor: 'move' }, ...(platform === PlatformType.H5
|
|
25961
25963
|
? {
|
|
25962
25964
|
onTouchStart: createReactEventHandler((e) => {
|
|
@@ -26037,7 +26039,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
26037
26039
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
26038
26040
|
const infoBoxHeight = 100 * overlayScale; // 信息框高度
|
|
26039
26041
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
26040
|
-
const scale = platform === PlatformType.H5 ? 1 * overlayScale : 2 * overlayScale;
|
|
26042
|
+
const scale = platform === PlatformType.H5 ? 1.8 * overlayScale : 2 * overlayScale;
|
|
26041
26043
|
const offsetLeft = 10 * scale;
|
|
26042
26044
|
return (jsxs(Fragment, { children: [showInfo && (jsx("foreignObject", { x: infoBoxX, y: infoBoxY, width: infoBoxWidth, height: infoBoxHeight, style: { textAlign: 'center' }, onClick: () => {
|
|
26043
26045
|
onClickInfo?.();
|
|
@@ -27281,7 +27283,7 @@ const Antennas = React__default.memo(({ editMap, antennaConfig = [], viewBox, ro
|
|
|
27281
27283
|
}, children: [jsx("div", { style: { marginBottom: 4, fontWeight: 600 }, children: item.tooltip.title }), jsxs("div", { style: { color: 'rgba(65, 93, 116, 1)', fontWeight: 400 }, children: [item.tooltip.statusText, item.tooltip.syncText || ''] })] })] }, `antenna-${item.type}`))) }));
|
|
27282
27284
|
});
|
|
27283
27285
|
|
|
27284
|
-
var css_248z$1 = ".index-module_mapEdit__XC5Gw {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n cursor: default;\n}\n.index-module_mapEdit__XC5Gw.index-module_createMode__14EPH {\n cursor: crosshair;\n}\n.index-module_mapEdit__XC5Gw.index-module_notCreateCursor__1-OjF {\n cursor: no-drop;\n}";
|
|
27286
|
+
var css_248z$1 = ".index-module_mapEdit__XC5Gw {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n cursor: default;\n min-width: 1px;\n min-height: 1px;\n}\n.index-module_mapEdit__XC5Gw.index-module_createMode__14EPH {\n cursor: crosshair;\n}\n.index-module_mapEdit__XC5Gw.index-module_notCreateCursor__1-OjF {\n cursor: no-drop;\n}";
|
|
27285
27287
|
var styles$1 = {"mapEdit":"index-module_mapEdit__XC5Gw","createMode":"index-module_createMode__14EPH","notCreateCursor":"index-module_notCreateCursor__1-OjF"};
|
|
27286
27288
|
styleInject(css_248z$1);
|
|
27287
27289
|
|
|
@@ -29249,7 +29251,17 @@ modelType, showStraddleBoundaryBorder = true, mapRef, mapJson, pathJson, realTim
|
|
|
29249
29251
|
// 基于固定的参考zoom级别计算overlayScale
|
|
29250
29252
|
const zoomDiff = currentZoom - REFERENCE_ZOOM;
|
|
29251
29253
|
const scale = Math.pow(2, -zoomDiff); // 负数实现反向缩放
|
|
29252
|
-
|
|
29254
|
+
console.log('scale------->', scale);
|
|
29255
|
+
// setOverlayScale(scale < 1 ? 1 : platform === PlatformType.H5 ? 1.5 * scale : scale);
|
|
29256
|
+
if (scale < 1) {
|
|
29257
|
+
setOverlayScale(1);
|
|
29258
|
+
}
|
|
29259
|
+
else if (scale > 200) {
|
|
29260
|
+
setOverlayScale(platform === PlatformType.H5 ? 300 : 200);
|
|
29261
|
+
}
|
|
29262
|
+
else {
|
|
29263
|
+
setOverlayScale(platform === PlatformType.H5 ? 1.5 * scale : scale);
|
|
29264
|
+
}
|
|
29253
29265
|
};
|
|
29254
29266
|
// 使用lodash throttle进行节流处理: 100ms内只执行一次
|
|
29255
29267
|
const handleZoomChanged = throttle$2(updateScale, 50);
|
package/dist/index.js
CHANGED
|
@@ -22494,11 +22494,13 @@ const ChannelClipPath = React.memo(() => {
|
|
|
22494
22494
|
const boundaryData = svgElementDatas?.[exports.DataType.BOUNDARY] || [];
|
|
22495
22495
|
const [minX, minY, maxX, maxY] = React.useMemo(() => {
|
|
22496
22496
|
const baseVal = svgViewBox;
|
|
22497
|
+
//.因为channel会有宽度,为了防止channel在边界会被截断,需要给边界留出一定的余量
|
|
22498
|
+
const padding = 20;
|
|
22497
22499
|
return [
|
|
22498
|
-
baseVal?.x || 0,
|
|
22499
|
-
baseVal?.y || 0,
|
|
22500
|
-
(baseVal?.x || 0) + (baseVal?.width || 0),
|
|
22501
|
-
(baseVal?.y || 0) + (baseVal?.height || 0),
|
|
22500
|
+
(baseVal?.x || 0) - padding,
|
|
22501
|
+
(baseVal?.y || 0) - padding,
|
|
22502
|
+
(baseVal?.x || 0) + (baseVal?.width || 0) + padding,
|
|
22503
|
+
(baseVal?.y || 0) + (baseVal?.height || 0) + padding,
|
|
22502
22504
|
];
|
|
22503
22505
|
}, [svgViewBox]);
|
|
22504
22506
|
/**
|
|
@@ -25277,7 +25279,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
25277
25279
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
25278
25280
|
const infoBoxHeight = 50 * overlayScale; // 信息框高度
|
|
25279
25281
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
25280
|
-
const scale = platform === exports.PlatformType.H5 ?
|
|
25282
|
+
const scale = platform === exports.PlatformType.H5 ? 1.8 * overlayScale : 3 * overlayScale;
|
|
25281
25283
|
const offsetLeft = 10 * scale;
|
|
25282
25284
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showInfo && (jsxRuntime.jsx("foreignObject", { x: infoBoxX, y: infoBoxY, width: infoBoxWidth, height: infoBoxHeight, style: { textAlign: 'center' }, children: jsxRuntime.jsxs("div", { style: {
|
|
25283
25285
|
padding: `5px ${10 * overlayScale}px`,
|
|
@@ -25976,7 +25978,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
25976
25978
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
25977
25979
|
const infoBoxHeight = 40 * overlayScale; // 信息框高度
|
|
25978
25980
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
25979
|
-
const circleScale = 2 * overlayScale;
|
|
25981
|
+
const circleScale = platform === exports.PlatformType.H5 ? 1.5 * overlayScale : 2 * overlayScale;
|
|
25980
25982
|
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", style: { cursor: 'move' }, ...(platform === exports.PlatformType.H5
|
|
25981
25983
|
? {
|
|
25982
25984
|
onTouchStart: createReactEventHandler((e) => {
|
|
@@ -26057,7 +26059,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
26057
26059
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
26058
26060
|
const infoBoxHeight = 100 * overlayScale; // 信息框高度
|
|
26059
26061
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
26060
|
-
const scale = platform === exports.PlatformType.H5 ? 1 * overlayScale : 2 * overlayScale;
|
|
26062
|
+
const scale = platform === exports.PlatformType.H5 ? 1.8 * overlayScale : 2 * overlayScale;
|
|
26061
26063
|
const offsetLeft = 10 * scale;
|
|
26062
26064
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showInfo && (jsxRuntime.jsx("foreignObject", { x: infoBoxX, y: infoBoxY, width: infoBoxWidth, height: infoBoxHeight, style: { textAlign: 'center' }, onClick: () => {
|
|
26063
26065
|
onClickInfo?.();
|
|
@@ -27301,7 +27303,7 @@ const Antennas = React.memo(({ editMap, antennaConfig = [], viewBox, rotation =
|
|
|
27301
27303
|
}, children: [jsxRuntime.jsx("div", { style: { marginBottom: 4, fontWeight: 600 }, children: item.tooltip.title }), jsxRuntime.jsxs("div", { style: { color: 'rgba(65, 93, 116, 1)', fontWeight: 400 }, children: [item.tooltip.statusText, item.tooltip.syncText || ''] })] })] }, `antenna-${item.type}`))) }));
|
|
27302
27304
|
});
|
|
27303
27305
|
|
|
27304
|
-
var css_248z$1 = ".index-module_mapEdit__XC5Gw {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n cursor: default;\n}\n.index-module_mapEdit__XC5Gw.index-module_createMode__14EPH {\n cursor: crosshair;\n}\n.index-module_mapEdit__XC5Gw.index-module_notCreateCursor__1-OjF {\n cursor: no-drop;\n}";
|
|
27306
|
+
var css_248z$1 = ".index-module_mapEdit__XC5Gw {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n cursor: default;\n min-width: 1px;\n min-height: 1px;\n}\n.index-module_mapEdit__XC5Gw.index-module_createMode__14EPH {\n cursor: crosshair;\n}\n.index-module_mapEdit__XC5Gw.index-module_notCreateCursor__1-OjF {\n cursor: no-drop;\n}";
|
|
27305
27307
|
var styles$1 = {"mapEdit":"index-module_mapEdit__XC5Gw","createMode":"index-module_createMode__14EPH","notCreateCursor":"index-module_notCreateCursor__1-OjF"};
|
|
27306
27308
|
styleInject(css_248z$1);
|
|
27307
27309
|
|
|
@@ -29269,7 +29271,17 @@ modelType, showStraddleBoundaryBorder = true, mapRef, mapJson, pathJson, realTim
|
|
|
29269
29271
|
// 基于固定的参考zoom级别计算overlayScale
|
|
29270
29272
|
const zoomDiff = currentZoom - REFERENCE_ZOOM;
|
|
29271
29273
|
const scale = Math.pow(2, -zoomDiff); // 负数实现反向缩放
|
|
29272
|
-
|
|
29274
|
+
console.log('scale------->', scale);
|
|
29275
|
+
// setOverlayScale(scale < 1 ? 1 : platform === PlatformType.H5 ? 1.5 * scale : scale);
|
|
29276
|
+
if (scale < 1) {
|
|
29277
|
+
setOverlayScale(1);
|
|
29278
|
+
}
|
|
29279
|
+
else if (scale > 200) {
|
|
29280
|
+
setOverlayScale(platform === exports.PlatformType.H5 ? 300 : 200);
|
|
29281
|
+
}
|
|
29282
|
+
else {
|
|
29283
|
+
setOverlayScale(platform === exports.PlatformType.H5 ? 1.5 * scale : scale);
|
|
29284
|
+
}
|
|
29273
29285
|
};
|
|
29274
29286
|
// 使用lodash throttle进行节流处理: 100ms内只执行一次
|
|
29275
29287
|
const handleZoomChanged = throttle$2(updateScale, 50);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAuBf,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AA0B3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AA8FD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAuBf,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AA0B3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AA8FD,eAAO,MAAM,gBAAgB,mGAstB5B,CAAC;AAIF,eAAe,gBAAgB,CAAC;AAChC,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/ChannelClipPath/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/ChannelClipPath/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,eAAe,0EAiNnB,CAAC;AAEH,eAAe,eAAe,CAAC"}
|