@micromag/element-map 0.3.651 → 0.3.659
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/es/index.js +21 -21
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -194,18 +194,18 @@ var eventsMapping = {
|
|
|
194
194
|
function useGoogleMap(_ref) {
|
|
195
195
|
var zoom = _ref.zoom,
|
|
196
196
|
_ref$maxZoom = _ref.maxZoom,
|
|
197
|
-
maxZoom = _ref$maxZoom ===
|
|
197
|
+
maxZoom = _ref$maxZoom === void 0 ? null : _ref$maxZoom,
|
|
198
198
|
_ref$center = _ref.center,
|
|
199
|
-
center = _ref$center ===
|
|
199
|
+
center = _ref$center === void 0 ? null : _ref$center,
|
|
200
200
|
_ref$withoutStyle = _ref.withoutStyle,
|
|
201
|
-
withoutStyle = _ref$withoutStyle ===
|
|
201
|
+
withoutStyle = _ref$withoutStyle === void 0 ? false : _ref$withoutStyle,
|
|
202
202
|
_ref$fitBounds = _ref.fitBounds,
|
|
203
|
-
fitBounds = _ref$fitBounds ===
|
|
203
|
+
fitBounds = _ref$fitBounds === void 0 ? false : _ref$fitBounds,
|
|
204
204
|
_ref$bounds = _ref.bounds,
|
|
205
|
-
bounds = _ref$bounds ===
|
|
205
|
+
bounds = _ref$bounds === void 0 ? null : _ref$bounds,
|
|
206
206
|
events = _ref.events,
|
|
207
207
|
_ref$draggable = _ref.draggable,
|
|
208
|
-
draggable = _ref$draggable ===
|
|
208
|
+
draggable = _ref$draggable === void 0 ? false : _ref$draggable,
|
|
209
209
|
zoomControl = _ref.zoomControl,
|
|
210
210
|
mapTypeControl = _ref.mapTypeControl,
|
|
211
211
|
scaleControl = _ref.scaleControl,
|
|
@@ -222,17 +222,17 @@ function useGoogleMap(_ref) {
|
|
|
222
222
|
var _useDimensionObserver = useDimensionObserver(),
|
|
223
223
|
resizeRef = _useDimensionObserver.ref,
|
|
224
224
|
_useDimensionObserver2 = _useDimensionObserver.width,
|
|
225
|
-
width = _useDimensionObserver2 ===
|
|
225
|
+
width = _useDimensionObserver2 === void 0 ? null : _useDimensionObserver2,
|
|
226
226
|
_useDimensionObserver3 = _useDimensionObserver.height,
|
|
227
|
-
height = _useDimensionObserver3 ===
|
|
227
|
+
height = _useDimensionObserver3 === void 0 ? null : _useDimensionObserver3;
|
|
228
228
|
useEffect(function () {
|
|
229
229
|
var map = mapRef.current;
|
|
230
230
|
if (map !== null && center !== null) {
|
|
231
231
|
var _ref2 = center || {},
|
|
232
232
|
_ref2$lat = _ref2.lat,
|
|
233
|
-
lat = _ref2$lat ===
|
|
233
|
+
lat = _ref2$lat === void 0 ? null : _ref2$lat,
|
|
234
234
|
_ref2$lng = _ref2.lng,
|
|
235
|
-
lng = _ref2$lng ===
|
|
235
|
+
lng = _ref2$lng === void 0 ? null : _ref2$lng;
|
|
236
236
|
map.panTo({
|
|
237
237
|
lat: lat || 0,
|
|
238
238
|
lng: lng || 0
|
|
@@ -441,11 +441,11 @@ var eventMapping = {
|
|
|
441
441
|
function useGoogleMapMarker(map) {
|
|
442
442
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
443
443
|
_ref$position = _ref.position,
|
|
444
|
-
position = _ref$position ===
|
|
444
|
+
position = _ref$position === void 0 ? null : _ref$position,
|
|
445
445
|
_ref$icon = _ref.icon,
|
|
446
|
-
icon = _ref$icon ===
|
|
446
|
+
icon = _ref$icon === void 0 ? null : _ref$icon,
|
|
447
447
|
_ref$iconSize = _ref.iconSize,
|
|
448
|
-
iconSize = _ref$iconSize ===
|
|
448
|
+
iconSize = _ref$iconSize === void 0 ? null : _ref$iconSize,
|
|
449
449
|
events = _ref.events,
|
|
450
450
|
title = _ref.title;
|
|
451
451
|
var client = useGoogleMapsClient();
|
|
@@ -463,7 +463,7 @@ function useGoogleMapMarker(map) {
|
|
|
463
463
|
if (isObject(newIcon)) {
|
|
464
464
|
var _ref2 = newIcon || {},
|
|
465
465
|
_ref2$url = _ref2.url,
|
|
466
|
-
iconUrl = _ref2$url ===
|
|
466
|
+
iconUrl = _ref2$url === void 0 ? null : _ref2$url;
|
|
467
467
|
marker.setIcon({
|
|
468
468
|
url: iconUrl,
|
|
469
469
|
scaledSize: new client.maps.Size(iconSize.width, iconSize.height)
|
|
@@ -647,12 +647,12 @@ var Map = function Map(_ref) {
|
|
|
647
647
|
}
|
|
648
648
|
var markersBounds = correctMarkers.reduce(function (newBounds, _ref2) {
|
|
649
649
|
var _ref2$geoPosition = _ref2.geoPosition,
|
|
650
|
-
geoPosition = _ref2$geoPosition ===
|
|
650
|
+
geoPosition = _ref2$geoPosition === void 0 ? null : _ref2$geoPosition;
|
|
651
651
|
var _ref3 = geoPosition || {},
|
|
652
652
|
_ref3$lat = _ref3.lat,
|
|
653
|
-
lat = _ref3$lat ===
|
|
653
|
+
lat = _ref3$lat === void 0 ? null : _ref3$lat,
|
|
654
654
|
_ref3$lng = _ref3.lng,
|
|
655
|
-
lng = _ref3$lng ===
|
|
655
|
+
lng = _ref3$lng === void 0 ? null : _ref3$lng;
|
|
656
656
|
if (lat !== null && lng !== null) {
|
|
657
657
|
newBounds.extend(new client.maps.LatLng(lat, lng));
|
|
658
658
|
}
|
|
@@ -703,13 +703,13 @@ var Map = function Map(_ref) {
|
|
|
703
703
|
focusable: focusable
|
|
704
704
|
}, markers !== null ? markers.map(function (_ref5, index) {
|
|
705
705
|
var _ref5$active = _ref5.active,
|
|
706
|
-
active = _ref5$active ===
|
|
706
|
+
active = _ref5$active === void 0 ? true : _ref5$active,
|
|
707
707
|
_ref5$geoPosition = _ref5.geoPosition,
|
|
708
|
-
geoPosition = _ref5$geoPosition ===
|
|
708
|
+
geoPosition = _ref5$geoPosition === void 0 ? null : _ref5$geoPosition,
|
|
709
709
|
_ref5$image = _ref5.image,
|
|
710
|
-
image = _ref5$image ===
|
|
710
|
+
image = _ref5$image === void 0 ? null : _ref5$image,
|
|
711
711
|
_ref5$title = _ref5.title,
|
|
712
|
-
title = _ref5$title ===
|
|
712
|
+
title = _ref5$title === void 0 ? null : _ref5$title;
|
|
713
713
|
return geoPosition !== null && (geoPosition.lat || null) !== null && (geoPosition.lng || null) !== null ? /*#__PURE__*/React.createElement(Marker, {
|
|
714
714
|
key: "marker-".concat(index),
|
|
715
715
|
active: active,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-map",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.659",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@babel/runtime": "^7.13.10",
|
|
62
|
-
"@micromag/core": "^0.3.
|
|
62
|
+
"@micromag/core": "^0.3.659",
|
|
63
63
|
"classnames": "^2.2.6",
|
|
64
64
|
"lodash": "^4.17.21",
|
|
65
65
|
"prop-types": "^15.7.2",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"access": "public",
|
|
71
71
|
"registry": "https://registry.npmjs.org/"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "7c13dad69a7e377cd2f900d95cb95694a3a8fcbb"
|
|
74
74
|
}
|