@fleet-frontend/mower-maps 0.2.0-beta.54 → 0.2.0-beta.55
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 +15 -5
- package/dist/index.js +15 -5
- package/dist/render/MowerMapRenderer.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -25257,7 +25257,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
25257
25257
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
25258
25258
|
const infoBoxHeight = 50 * overlayScale; // 信息框高度
|
|
25259
25259
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
25260
|
-
const scale = platform === PlatformType.H5 ?
|
|
25260
|
+
const scale = platform === PlatformType.H5 ? 1.8 * overlayScale : 3 * overlayScale;
|
|
25261
25261
|
const offsetLeft = 10 * scale;
|
|
25262
25262
|
return (jsxs(Fragment, { children: [showInfo && (jsx("foreignObject", { x: infoBoxX, y: infoBoxY, width: infoBoxWidth, height: infoBoxHeight, style: { textAlign: 'center' }, children: jsxs("div", { style: {
|
|
25263
25263
|
padding: `5px ${10 * overlayScale}px`,
|
|
@@ -25956,7 +25956,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
25956
25956
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
25957
25957
|
const infoBoxHeight = 40 * overlayScale; // 信息框高度
|
|
25958
25958
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
25959
|
-
const circleScale = 2 * overlayScale;
|
|
25959
|
+
const circleScale = platform === PlatformType.H5 ? 1.5 * overlayScale : 2 * overlayScale;
|
|
25960
25960
|
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
25961
|
? {
|
|
25962
25962
|
onTouchStart: createReactEventHandler((e) => {
|
|
@@ -26037,7 +26037,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
26037
26037
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
26038
26038
|
const infoBoxHeight = 100 * overlayScale; // 信息框高度
|
|
26039
26039
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
26040
|
-
const scale = platform === PlatformType.H5 ? 1 * overlayScale : 2 * overlayScale;
|
|
26040
|
+
const scale = platform === PlatformType.H5 ? 1.8 * overlayScale : 2 * overlayScale;
|
|
26041
26041
|
const offsetLeft = 10 * scale;
|
|
26042
26042
|
return (jsxs(Fragment, { children: [showInfo && (jsx("foreignObject", { x: infoBoxX, y: infoBoxY, width: infoBoxWidth, height: infoBoxHeight, style: { textAlign: 'center' }, onClick: () => {
|
|
26043
26043
|
onClickInfo?.();
|
|
@@ -27281,7 +27281,7 @@ const Antennas = React__default.memo(({ editMap, antennaConfig = [], viewBox, ro
|
|
|
27281
27281
|
}, 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
27282
|
});
|
|
27283
27283
|
|
|
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}";
|
|
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 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
27285
|
var styles$1 = {"mapEdit":"index-module_mapEdit__XC5Gw","createMode":"index-module_createMode__14EPH","notCreateCursor":"index-module_notCreateCursor__1-OjF"};
|
|
27286
27286
|
styleInject(css_248z$1);
|
|
27287
27287
|
|
|
@@ -29249,7 +29249,17 @@ modelType, showStraddleBoundaryBorder = true, mapRef, mapJson, pathJson, realTim
|
|
|
29249
29249
|
// 基于固定的参考zoom级别计算overlayScale
|
|
29250
29250
|
const zoomDiff = currentZoom - REFERENCE_ZOOM;
|
|
29251
29251
|
const scale = Math.pow(2, -zoomDiff); // 负数实现反向缩放
|
|
29252
|
-
|
|
29252
|
+
console.log('scale------->', scale);
|
|
29253
|
+
// setOverlayScale(scale < 1 ? 1 : platform === PlatformType.H5 ? 1.5 * scale : scale);
|
|
29254
|
+
if (scale < 1) {
|
|
29255
|
+
setOverlayScale(1);
|
|
29256
|
+
}
|
|
29257
|
+
else if (scale > 200) {
|
|
29258
|
+
setOverlayScale(platform === PlatformType.H5 ? 300 : 200);
|
|
29259
|
+
}
|
|
29260
|
+
else {
|
|
29261
|
+
setOverlayScale(platform === PlatformType.H5 ? 1.5 * scale : scale);
|
|
29262
|
+
}
|
|
29253
29263
|
};
|
|
29254
29264
|
// 使用lodash throttle进行节流处理: 100ms内只执行一次
|
|
29255
29265
|
const handleZoomChanged = throttle$2(updateScale, 50);
|
package/dist/index.js
CHANGED
|
@@ -25277,7 +25277,7 @@ const VisionOffTransformWrapper = ({ data, isSelected = false, onSelect, onCance
|
|
|
25277
25277
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
25278
25278
|
const infoBoxHeight = 50 * overlayScale; // 信息框高度
|
|
25279
25279
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
25280
|
-
const scale = platform === exports.PlatformType.H5 ?
|
|
25280
|
+
const scale = platform === exports.PlatformType.H5 ? 1.8 * overlayScale : 3 * overlayScale;
|
|
25281
25281
|
const offsetLeft = 10 * scale;
|
|
25282
25282
|
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
25283
|
padding: `5px ${10 * overlayScale}px`,
|
|
@@ -25976,7 +25976,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
25976
25976
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
25977
25977
|
const infoBoxHeight = 40 * overlayScale; // 信息框高度
|
|
25978
25978
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
25979
|
-
const circleScale = 2 * overlayScale;
|
|
25979
|
+
const circleScale = platform === exports.PlatformType.H5 ? 1.5 * overlayScale : 2 * overlayScale;
|
|
25980
25980
|
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
25981
|
? {
|
|
25982
25982
|
onTouchStart: createReactEventHandler((e) => {
|
|
@@ -26057,7 +26057,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
|
|
|
26057
26057
|
const infoBoxWidth = 300 * overlayScale; // 信息框宽度
|
|
26058
26058
|
const infoBoxHeight = 100 * overlayScale; // 信息框高度
|
|
26059
26059
|
const infoBoxX = centerX - infoBoxWidth / 2; // 居中对齐
|
|
26060
|
-
const scale = platform === exports.PlatformType.H5 ? 1 * overlayScale : 2 * overlayScale;
|
|
26060
|
+
const scale = platform === exports.PlatformType.H5 ? 1.8 * overlayScale : 2 * overlayScale;
|
|
26061
26061
|
const offsetLeft = 10 * scale;
|
|
26062
26062
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showInfo && (jsxRuntime.jsx("foreignObject", { x: infoBoxX, y: infoBoxY, width: infoBoxWidth, height: infoBoxHeight, style: { textAlign: 'center' }, onClick: () => {
|
|
26063
26063
|
onClickInfo?.();
|
|
@@ -27301,7 +27301,7 @@ const Antennas = React.memo(({ editMap, antennaConfig = [], viewBox, rotation =
|
|
|
27301
27301
|
}, 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
27302
|
});
|
|
27303
27303
|
|
|
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}";
|
|
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 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
27305
|
var styles$1 = {"mapEdit":"index-module_mapEdit__XC5Gw","createMode":"index-module_createMode__14EPH","notCreateCursor":"index-module_notCreateCursor__1-OjF"};
|
|
27306
27306
|
styleInject(css_248z$1);
|
|
27307
27307
|
|
|
@@ -29269,7 +29269,17 @@ modelType, showStraddleBoundaryBorder = true, mapRef, mapJson, pathJson, realTim
|
|
|
29269
29269
|
// 基于固定的参考zoom级别计算overlayScale
|
|
29270
29270
|
const zoomDiff = currentZoom - REFERENCE_ZOOM;
|
|
29271
29271
|
const scale = Math.pow(2, -zoomDiff); // 负数实现反向缩放
|
|
29272
|
-
|
|
29272
|
+
console.log('scale------->', scale);
|
|
29273
|
+
// setOverlayScale(scale < 1 ? 1 : platform === PlatformType.H5 ? 1.5 * scale : scale);
|
|
29274
|
+
if (scale < 1) {
|
|
29275
|
+
setOverlayScale(1);
|
|
29276
|
+
}
|
|
29277
|
+
else if (scale > 200) {
|
|
29278
|
+
setOverlayScale(platform === exports.PlatformType.H5 ? 300 : 200);
|
|
29279
|
+
}
|
|
29280
|
+
else {
|
|
29281
|
+
setOverlayScale(platform === exports.PlatformType.H5 ? 1.5 * scale : scale);
|
|
29282
|
+
}
|
|
29273
29283
|
};
|
|
29274
29284
|
// 使用lodash throttle进行节流处理: 100ms内只执行一次
|
|
29275
29285
|
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"}
|