@banyan_cloud/roots 1.0.83 → 1.0.84
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/cjs/index.js +16 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +16 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +16 -6
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -112188,12 +112188,18 @@ var BaseMap = function BaseMap(props) {
|
|
|
112188
112188
|
setMap = _useState2[1];
|
|
112189
112189
|
var _useState3 = React.useState(null),
|
|
112190
112190
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
112191
|
-
|
|
112192
|
-
|
|
112191
|
+
markerClusterer = _useState4[0],
|
|
112192
|
+
setMarkerClusterer = _useState4[1];
|
|
112193
|
+
var _useState5 = React.useState(null),
|
|
112194
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
112195
|
+
activeInfoWindow = _useState6[0],
|
|
112196
|
+
setActiveInfoWindow = _useState6[1];
|
|
112193
112197
|
React.useEffect(function () {
|
|
112194
112198
|
if (ref.current && !map) {
|
|
112195
112199
|
setMap(new window.google.maps.Map(ref.current, {
|
|
112196
|
-
mapId: mapId
|
|
112200
|
+
mapId: mapId,
|
|
112201
|
+
mapTypeControl: false,
|
|
112202
|
+
streetViewControl: false
|
|
112197
112203
|
}));
|
|
112198
112204
|
}
|
|
112199
112205
|
}, [map]);
|
|
@@ -112201,15 +112207,19 @@ var BaseMap = function BaseMap(props) {
|
|
|
112201
112207
|
var _markersRef$current;
|
|
112202
112208
|
if (clustered && map && React.Children.count(children) > 0 && (markersRef === null || markersRef === void 0 ? void 0 : (_markersRef$current = markersRef.current) === null || _markersRef$current === void 0 ? void 0 : _markersRef$current.length) > 0) {
|
|
112203
112209
|
var _markersRef$current2;
|
|
112210
|
+
if (markerClusterer) {
|
|
112211
|
+
markerClusterer.clearMarkers();
|
|
112212
|
+
setMarkerClusterer(null);
|
|
112213
|
+
}
|
|
112204
112214
|
var markers = markersRef === null || markersRef === void 0 ? void 0 : (_markersRef$current2 = markersRef.current) === null || _markersRef$current2 === void 0 ? void 0 : _markersRef$current2.map(function (marker) {
|
|
112205
112215
|
return marker.current;
|
|
112206
112216
|
});
|
|
112207
112217
|
|
|
112208
112218
|
// eslint-disable-next-line no-new
|
|
112209
|
-
new MarkerClusterer({
|
|
112219
|
+
setMarkerClusterer(new MarkerClusterer({
|
|
112210
112220
|
map: map,
|
|
112211
112221
|
markers: markers
|
|
112212
|
-
});
|
|
112222
|
+
}));
|
|
112213
112223
|
}
|
|
112214
112224
|
}, [clustered, children, map]);
|
|
112215
112225
|
React.useEffect(function () {
|
|
@@ -112386,7 +112396,7 @@ var Marker = /*#__PURE__*/React.forwardRef(function Marker(_ref, ref) {
|
|
|
112386
112396
|
React.useEffect(function () {
|
|
112387
112397
|
if (activeInfoWindow == null || activeInfoWindow !== index) {
|
|
112388
112398
|
var infoWindow = infoWindowRef === null || infoWindowRef === void 0 ? void 0 : infoWindowRef.current;
|
|
112389
|
-
infoWindow.close();
|
|
112399
|
+
infoWindow === null || infoWindow === void 0 ? void 0 : infoWindow.close();
|
|
112390
112400
|
}
|
|
112391
112401
|
}, [activeInfoWindow]);
|
|
112392
112402
|
if (React.Children.count(children) === 1) {
|