@fleet-frontend/mower-maps 0.2.5-beta.4 → 0.2.5-beta.5
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
|
@@ -23060,7 +23060,7 @@ const useChargingPile = ({ viewBox, rotation = 0 }) => {
|
|
|
23060
23060
|
return items;
|
|
23061
23061
|
};
|
|
23062
23062
|
|
|
23063
|
-
const CharginPile = React__default.memo(({ viewBox, rotation = 0 }) => {
|
|
23063
|
+
const CharginPile = React__default.memo(({ viewBox, rotation = 0, sizeScale = 1 }) => {
|
|
23064
23064
|
const items = useChargingPile({ viewBox: viewBox || null, rotation });
|
|
23065
23065
|
const containerStyle = useMemo(() => ({
|
|
23066
23066
|
position: 'absolute',
|
|
@@ -23073,8 +23073,8 @@ const CharginPile = React__default.memo(({ viewBox, rotation = 0 }) => {
|
|
|
23073
23073
|
}), []);
|
|
23074
23074
|
return (jsx("div", { style: containerStyle, children: items?.map((item, idx) => (jsx("div", { className: "charging-pile", style: {
|
|
23075
23075
|
position: 'absolute',
|
|
23076
|
-
width: item.size,
|
|
23077
|
-
height: item.size,
|
|
23076
|
+
width: item.size * sizeScale,
|
|
23077
|
+
height: item.size * sizeScale,
|
|
23078
23078
|
left: `${item.leftPct}%`,
|
|
23079
23079
|
top: `${item.topPct}%`,
|
|
23080
23080
|
transform: `translate(-50%, -50%) rotate(${item.rotateDeg}deg)`,
|
|
@@ -23427,7 +23427,7 @@ const Magnifier = ({ visible, dragState, polygonPoints, fillColor = 'rgba(255, 1
|
|
|
23427
23427
|
? 3.6 / styleZoomFactor
|
|
23428
23428
|
: 3 / styleZoomFactor;
|
|
23429
23429
|
return (jsx("circle", { cx: x, cy: y, r: pointRadius, fill: pointFill, stroke: pointStroke, strokeWidth: pointStrokeWidth }, idx));
|
|
23430
|
-
})] })), dragState.dragType === 'new' && dragState.edgeInfo && (jsx(Fragment, { children: jsx("line", { x1: dragState.edgeInfo.startPoint.x, y1: dragState.edgeInfo.startPoint.y, x2: dragState.edgeInfo.endPoint.x, y2: dragState.edgeInfo.endPoint.y, stroke: "#999", strokeWidth: (strokeWidth * 3.2) / styleZoomFactor, strokeDasharray: `${6 / styleZoomFactor},${6 / styleZoomFactor}` }) }))] }), jsx(CharginPile, { viewBox: magnifierViewBox || null, rotation: actureRotate })] }));
|
|
23430
|
+
})] })), dragState.dragType === 'new' && dragState.edgeInfo && (jsx(Fragment, { children: jsx("line", { x1: dragState.edgeInfo.startPoint.x, y1: dragState.edgeInfo.startPoint.y, x2: dragState.edgeInfo.endPoint.x, y2: dragState.edgeInfo.endPoint.y, stroke: "#999", strokeWidth: (strokeWidth * 3.2) / styleZoomFactor, strokeDasharray: `${6 / styleZoomFactor},${6 / styleZoomFactor}` }) }))] }), jsx(CharginPile, { viewBox: magnifierViewBox || null, rotation: actureRotate, sizeScale: Math.max(1, zoom) })] }));
|
|
23431
23431
|
// 使用 Portal 渲染到 body,避免层级问题
|
|
23432
23432
|
return ReactDOM.createPortal(magnifierContent, document.body);
|
|
23433
23433
|
};
|
package/dist/index.js
CHANGED
|
@@ -23080,7 +23080,7 @@ const useChargingPile = ({ viewBox, rotation = 0 }) => {
|
|
|
23080
23080
|
return items;
|
|
23081
23081
|
};
|
|
23082
23082
|
|
|
23083
|
-
const CharginPile = React.memo(({ viewBox, rotation = 0 }) => {
|
|
23083
|
+
const CharginPile = React.memo(({ viewBox, rotation = 0, sizeScale = 1 }) => {
|
|
23084
23084
|
const items = useChargingPile({ viewBox: viewBox || null, rotation });
|
|
23085
23085
|
const containerStyle = React.useMemo(() => ({
|
|
23086
23086
|
position: 'absolute',
|
|
@@ -23093,8 +23093,8 @@ const CharginPile = React.memo(({ viewBox, rotation = 0 }) => {
|
|
|
23093
23093
|
}), []);
|
|
23094
23094
|
return (jsxRuntime.jsx("div", { style: containerStyle, children: items?.map((item, idx) => (jsxRuntime.jsx("div", { className: "charging-pile", style: {
|
|
23095
23095
|
position: 'absolute',
|
|
23096
|
-
width: item.size,
|
|
23097
|
-
height: item.size,
|
|
23096
|
+
width: item.size * sizeScale,
|
|
23097
|
+
height: item.size * sizeScale,
|
|
23098
23098
|
left: `${item.leftPct}%`,
|
|
23099
23099
|
top: `${item.topPct}%`,
|
|
23100
23100
|
transform: `translate(-50%, -50%) rotate(${item.rotateDeg}deg)`,
|
|
@@ -23447,7 +23447,7 @@ const Magnifier = ({ visible, dragState, polygonPoints, fillColor = 'rgba(255, 1
|
|
|
23447
23447
|
? 3.6 / styleZoomFactor
|
|
23448
23448
|
: 3 / styleZoomFactor;
|
|
23449
23449
|
return (jsxRuntime.jsx("circle", { cx: x, cy: y, r: pointRadius, fill: pointFill, stroke: pointStroke, strokeWidth: pointStrokeWidth }, idx));
|
|
23450
|
-
})] })), dragState.dragType === 'new' && dragState.edgeInfo && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("line", { x1: dragState.edgeInfo.startPoint.x, y1: dragState.edgeInfo.startPoint.y, x2: dragState.edgeInfo.endPoint.x, y2: dragState.edgeInfo.endPoint.y, stroke: "#999", strokeWidth: (strokeWidth * 3.2) / styleZoomFactor, strokeDasharray: `${6 / styleZoomFactor},${6 / styleZoomFactor}` }) }))] }), jsxRuntime.jsx(CharginPile, { viewBox: magnifierViewBox || null, rotation: actureRotate })] }));
|
|
23450
|
+
})] })), dragState.dragType === 'new' && dragState.edgeInfo && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("line", { x1: dragState.edgeInfo.startPoint.x, y1: dragState.edgeInfo.startPoint.y, x2: dragState.edgeInfo.endPoint.x, y2: dragState.edgeInfo.endPoint.y, stroke: "#999", strokeWidth: (strokeWidth * 3.2) / styleZoomFactor, strokeDasharray: `${6 / styleZoomFactor},${6 / styleZoomFactor}` }) }))] }), jsxRuntime.jsx(CharginPile, { viewBox: magnifierViewBox || null, rotation: actureRotate, sizeScale: Math.max(1, zoom) })] }));
|
|
23451
23451
|
// 使用 Portal 渲染到 body,避免层级问题
|
|
23452
23452
|
return ReactDOM.createPortal(magnifierContent, document.body);
|
|
23453
23453
|
};
|
|
@@ -7,7 +7,8 @@ interface ChargingPileProps {
|
|
|
7
7
|
height: number;
|
|
8
8
|
} | null;
|
|
9
9
|
rotation?: number;
|
|
10
|
+
sizeScale?: number;
|
|
10
11
|
}
|
|
11
|
-
declare const CharginPile: React.MemoExoticComponent<({ viewBox, rotation }: ChargingPileProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
|
+
declare const CharginPile: React.MemoExoticComponent<({ viewBox, rotation, sizeScale }: ChargingPileProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
13
|
export default CharginPile;
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/charginPile/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/charginPile/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,WAAW,+DAAyD,iBAAiB,6CAyCzF,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/render/svgElement/PolygonELement/components/Magnifier/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAc5E,UAAU,SAAS;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE;QACR,UAAU,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACrC,QAAQ,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACnC,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,IAAI,CAAC;IACT,QAAQ,EAAE,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC;CACrC;AAED,UAAU,cAAc;IACtB,cAAc;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW;IACX,SAAS,EAAE,SAAS,CAAC;IACrB,iBAAiB;IACjB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,WAAW;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/render/svgElement/PolygonELement/components/Magnifier/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAc5E,UAAU,SAAS;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE;QACR,UAAU,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACrC,QAAQ,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACnC,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,IAAI,CAAC;IACT,QAAQ,EAAE,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC;CACrC;AAED,UAAU,cAAc;IACtB,cAAc;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW;IACX,SAAS,EAAE,SAAS,CAAC;IACrB,iBAAiB;IACjB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,WAAW;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA4dvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|