andoncloud-map-widget 1.0.4 → 1.0.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.js CHANGED
@@ -614,11 +614,7 @@ function Trans(_ref) {
614
614
  defaultNSFromContext = _ref2.defaultNS;
615
615
 
616
616
  var i18n = i18nFromProps || i18nFromContext || getI18n();
617
-
618
- var t = tFromProps || i18n.t.bind(i18n) || function (k) {
619
- return k;
620
- };
621
-
617
+ var t = tFromProps || i18n && i18n.t.bind(i18n);
622
618
  return Trans$1(_objectSpread$9({
623
619
  children: children,
624
620
  count: count,
@@ -629,7 +625,7 @@ function Trans(_ref) {
629
625
  values: values,
630
626
  defaults: defaults,
631
627
  components: components,
632
- ns: ns || t.ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS,
628
+ ns: ns || t && t.ns || defaultNSFromContext || i18n && i18n.options && i18n.options.defaultNS,
633
629
  i18n: i18n,
634
630
  t: tFromProps,
635
631
  shouldUnescape: shouldUnescape
@@ -4324,7 +4320,7 @@ function hasMultilineItems(maybeArray) {
4324
4320
  return maybeArray != null && maybeArray.some(isMultiline);
4325
4321
  }
4326
4322
 
4327
- var LIBRARY_VERSION = '1.0.4';
4323
+ var LIBRARY_VERSION = '1.0.5';
4328
4324
 
4329
4325
  var SettingsFormContent = function SettingsFormContent(_ref) {
4330
4326
  var _data$floorPlans;
@@ -22667,15 +22663,19 @@ var Map$1 = function Map(_ref) {
22667
22663
  }, workplace.name);
22668
22664
  })), React__default["default"].createElement(MapContainer, {
22669
22665
  ref: mapRef,
22670
- bounds: [[height, 0], [0, width]],
22671
22666
  center: (settings == null ? void 0 : settings.center) || [width / 2, height / 2],
22667
+ minZoom: 1,
22668
+ maxZoom: 5,
22672
22669
  zoom: (settings == null ? void 0 : settings.zoom) || 1,
22670
+ zoomSnap: 0.1,
22671
+ zoomDelta: 0.1,
22672
+ wheelPxPerZoomLevel: 600,
22673
22673
  zoomControl: false,
22674
22674
  doubleClickZoom: false,
22675
22675
  touchZoom: false
22676
- }, imageUrl && imageDimensions && React__default["default"].createElement(ImageOverlay, {
22676
+ }, mapRef.current && imageUrl && imageDimensions && React__default["default"].createElement(ImageOverlay, {
22677
22677
  url: imageUrl,
22678
- bounds: [[height, 0], [0, height * (imageDimensions.height / imageDimensions.width)]]
22678
+ bounds: new leafletSrc.LatLngBounds(mapRef.current.unproject([0, imageDimensions.height], 2), mapRef.current.unproject([imageDimensions.width, 0], 2))
22679
22679
  }), React__default["default"].createElement(FeatureGroup, {
22680
22680
  ref: function ref(featureGroup) {
22681
22681
  if (featureGroup) onFeatureGroupReady(featureGroup);