react-map4d-map 1.2.1 → 1.2.2

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.
@@ -440,6 +440,7 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
440
440
  waypointMarkerOptions = props.waypointMarkerOptions,
441
441
  onMarkerDragEnd = props.onMarkerDragEnd,
442
442
  map = props.map,
443
+ onHover = props.onHover,
443
444
  onCreated = props.onCreated;
444
445
  var map4dContext = useContext(Map4dContext);
445
446
  var theMap = map || map4dContext.map;
@@ -477,6 +478,11 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
477
478
  onCreated && onCreated(directionRef.current);
478
479
  }
479
480
  }, [theMap]);
481
+ useEffect(function () {
482
+ if (directionRef.current) {
483
+ directionRef.current.onHover = onHover;
484
+ }
485
+ }, [onHover]);
480
486
  useEffect(function () {
481
487
  if (theMap) {
482
488
  var _directionRef$current2;
@@ -953,7 +959,10 @@ var MFMarker = function MFMarker(props) {
953
959
  userInteractionEnabled = props.userInteractionEnabled,
954
960
  map = props.map,
955
961
  onCreated = props.onCreated,
956
- onClick = props.onClick;
962
+ onClick = props.onClick,
963
+ onRightClick = props.onRightClick,
964
+ onDragEnd = props.onDragEnd,
965
+ onHover = props.onHover;
957
966
  var map4dContext = useContext(Map4dContext);
958
967
  var markerClusterContext = useContext(MarkerClusterContext);
959
968
  var theMap = map || map4dContext.map;
@@ -1044,6 +1053,26 @@ var MFMarker = function MFMarker(props) {
1044
1053
  markerRef.current && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.removeMarker) && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.removeMarker(markerRef.current));
1045
1054
  };
1046
1055
  }, []);
1056
+ useEffect(function () {
1057
+ if (markerRef.current) {
1058
+ markerRef.current.onHover = onHover;
1059
+ }
1060
+ }, [onHover]);
1061
+ useEffect(function () {
1062
+ if (markerRef.current) {
1063
+ markerRef.current.onClick = onClick;
1064
+ }
1065
+ }, [onClick]);
1066
+ useEffect(function () {
1067
+ if (markerRef.current) {
1068
+ markerRef.current.onRightClick = onRightClick;
1069
+ }
1070
+ }, [onRightClick]);
1071
+ useEffect(function () {
1072
+ if (markerRef.current) {
1073
+ markerRef.current.onHover = onDragEnd;
1074
+ }
1075
+ }, [onDragEnd]);
1047
1076
  useEffect(function () {
1048
1077
  var _markerRef$current4;
1049
1078
 
@@ -1441,6 +1470,7 @@ var MFPolygon = function MFPolygon(props) {
1441
1470
  zIndex = props.zIndex,
1442
1471
  userInteractionEnabled = props.userInteractionEnabled,
1443
1472
  map = props.map,
1473
+ onHover = props.onHover,
1444
1474
  onCreated = props.onCreated;
1445
1475
  var map4dContext = useContext(Map4dContext);
1446
1476
  var theMap = map || map4dContext.map;
@@ -1492,6 +1522,11 @@ var MFPolygon = function MFPolygon(props) {
1492
1522
  (_polygonRef$current4 = polygonRef.current) === null || _polygonRef$current4 === void 0 ? void 0 : _polygonRef$current4.setMap(null);
1493
1523
  };
1494
1524
  }, []);
1525
+ useEffect(function () {
1526
+ if (polygonRef.current) {
1527
+ polygonRef.current.onHover = onHover;
1528
+ }
1529
+ }, [onHover]);
1495
1530
  useEffect(function () {
1496
1531
  var _polygonRef$current5;
1497
1532
 
@@ -1559,6 +1594,8 @@ var MFPolyline = function MFPolyline(props) {
1559
1594
  strokePattern = props.strokePattern,
1560
1595
  userInteractionEnabled = props.userInteractionEnabled,
1561
1596
  map = props.map,
1597
+ onClick = props.onClick,
1598
+ onHover = props.onHover,
1562
1599
  onCreated = props.onCreated;
1563
1600
  var map4dContext = useContext(Map4dContext);
1564
1601
  var theMap = map || map4dContext.map;
@@ -1615,6 +1652,16 @@ var MFPolyline = function MFPolyline(props) {
1615
1652
  (_polylineRef$current4 = polylineRef.current) === null || _polylineRef$current4 === void 0 ? void 0 : _polylineRef$current4.setMap(null);
1616
1653
  };
1617
1654
  }, []);
1655
+ useEffect(function () {
1656
+ if (polylineRef.current) {
1657
+ polylineRef.current.onHover = onHover;
1658
+ }
1659
+ }, [onHover]);
1660
+ useEffect(function () {
1661
+ if (polylineRef.current) {
1662
+ polylineRef.current.onClick = onClick;
1663
+ }
1664
+ }, [onClick]);
1618
1665
  useEffect(function () {
1619
1666
  var _polylineRef$current5;
1620
1667