@fleet-frontend/mower-maps 0.1.0-beta.3 → 0.1.0-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 +5 -15
- package/dist/index.js +5 -15
- package/dist/render/MowerMapRenderer.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -12335,21 +12335,11 @@ const MowerMapRenderer = forwardRef(({ edger = false, unitType = UnitsType.Imper
|
|
|
12335
12335
|
}
|
|
12336
12336
|
}
|
|
12337
12337
|
}, [realTimeData, mapJson, pathJson]);
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
|
|
12341
|
-
|
|
12342
|
-
|
|
12343
|
-
// const swLat = validBounds.sw[1] + defaultTransform.y;
|
|
12344
|
-
// const swLng = validBounds.sw[0] + defaultTransform.x;
|
|
12345
|
-
// const neLat = validBounds.ne[1] + defaultTransform.y;
|
|
12346
|
-
// const neLng = validBounds.ne[0] + defaultTransform.x;
|
|
12347
|
-
// const googleBounds = new window.google.maps.LatLngBounds(
|
|
12348
|
-
// new window.google.maps.LatLng(swLat, swLng), // 西南角
|
|
12349
|
-
// new window.google.maps.LatLng(neLat, neLng) // 东北角
|
|
12350
|
-
// );
|
|
12351
|
-
// mapRef.fitBounds(googleBounds);
|
|
12352
|
-
// }, [defaultTransform]);
|
|
12338
|
+
useEffect(() => {
|
|
12339
|
+
if (!overlayRef.current || !defaultTransform)
|
|
12340
|
+
return;
|
|
12341
|
+
overlayRef.current?.setTransform(defaultTransform);
|
|
12342
|
+
}, [defaultTransform]);
|
|
12353
12343
|
useEffect(() => {
|
|
12354
12344
|
if (!overlayRef || !overlayRef.current)
|
|
12355
12345
|
return;
|
package/dist/index.js
CHANGED
|
@@ -12337,21 +12337,11 @@ const MowerMapRenderer = React.forwardRef(({ edger = false, unitType = UnitsType
|
|
|
12337
12337
|
}
|
|
12338
12338
|
}
|
|
12339
12339
|
}, [realTimeData, mapJson, pathJson]);
|
|
12340
|
-
|
|
12341
|
-
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
// const swLat = validBounds.sw[1] + defaultTransform.y;
|
|
12346
|
-
// const swLng = validBounds.sw[0] + defaultTransform.x;
|
|
12347
|
-
// const neLat = validBounds.ne[1] + defaultTransform.y;
|
|
12348
|
-
// const neLng = validBounds.ne[0] + defaultTransform.x;
|
|
12349
|
-
// const googleBounds = new window.google.maps.LatLngBounds(
|
|
12350
|
-
// new window.google.maps.LatLng(swLat, swLng), // 西南角
|
|
12351
|
-
// new window.google.maps.LatLng(neLat, neLng) // 东北角
|
|
12352
|
-
// );
|
|
12353
|
-
// mapRef.fitBounds(googleBounds);
|
|
12354
|
-
// }, [defaultTransform]);
|
|
12340
|
+
React.useEffect(() => {
|
|
12341
|
+
if (!overlayRef.current || !defaultTransform)
|
|
12342
|
+
return;
|
|
12343
|
+
overlayRef.current?.setTransform(defaultTransform);
|
|
12344
|
+
}, [defaultTransform]);
|
|
12355
12345
|
React.useEffect(() => {
|
|
12356
12346
|
if (!overlayRef || !overlayRef.current)
|
|
12357
12347
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AA6Cf,OAAO,EAAa,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAO1F,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAgGD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AA6Cf,OAAO,EAAa,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAO1F,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAgGD,eAAO,MAAM,gBAAgB,mGAitB5B,CAAC;AAIF,eAAe,gBAAgB,CAAC;AAChC,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
|