react-map4d-map 1.2.2 → 1.2.3

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
@@ -1017,7 +1017,9 @@ var MFMarker = function MFMarker(props) {
1017
1017
  }
1018
1018
 
1019
1019
  if (props.showInfoWindow != undefined) {
1020
- props.showInfoWindow ? markerRef.current.showInfoWindow() : markerRef.current.hideInfoWindow();
1020
+ var _markerRef$current, _markerRef$current2;
1021
+
1022
+ props.showInfoWindow ? (_markerRef$current = markerRef.current) === null || _markerRef$current === void 0 ? void 0 : _markerRef$current.showInfoWindow() : (_markerRef$current2 = markerRef.current) === null || _markerRef$current2 === void 0 ? void 0 : _markerRef$current2.hideInfoWindow();
1021
1023
  }
1022
1024
 
1023
1025
  markerRef.current.onClick = onClick;
@@ -1031,26 +1033,26 @@ var MFMarker = function MFMarker(props) {
1031
1033
  React.useEffect(function () {
1032
1034
  if (theMap) {
1033
1035
  if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
1034
- var _markerRef$current;
1036
+ var _markerRef$current3;
1035
1037
 
1036
- (_markerRef$current = markerRef.current) === null || _markerRef$current === void 0 ? void 0 : _markerRef$current.setMap(theMap);
1038
+ (_markerRef$current3 = markerRef.current) === null || _markerRef$current3 === void 0 ? void 0 : _markerRef$current3.setMap(theMap);
1037
1039
  }
1038
1040
  }
1039
1041
 
1040
1042
  return function () {
1041
1043
  if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
1042
- var _markerRef$current2;
1044
+ var _markerRef$current4;
1043
1045
 
1044
- (_markerRef$current2 = markerRef.current) === null || _markerRef$current2 === void 0 ? void 0 : _markerRef$current2.setMap(null);
1046
+ (_markerRef$current4 = markerRef.current) === null || _markerRef$current4 === void 0 ? void 0 : _markerRef$current4.setMap(null);
1045
1047
  }
1046
1048
  };
1047
1049
  }, [theMap]);
1048
1050
  React.useEffect(function () {
1049
1051
  return function () {
1050
1052
  if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
1051
- var _markerRef$current3;
1053
+ var _markerRef$current5;
1052
1054
 
1053
- (_markerRef$current3 = markerRef.current) === null || _markerRef$current3 === void 0 ? void 0 : _markerRef$current3.setMap(null);
1055
+ (_markerRef$current5 = markerRef.current) === null || _markerRef$current5 === void 0 ? void 0 : _markerRef$current5.setMap(null);
1054
1056
  }
1055
1057
 
1056
1058
  markerRef.current && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.removeMarker) && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.removeMarker(markerRef.current));
@@ -1077,98 +1079,100 @@ var MFMarker = function MFMarker(props) {
1077
1079
  }
1078
1080
  }, [onDragEnd]);
1079
1081
  React.useEffect(function () {
1080
- var _markerRef$current4;
1082
+ var _markerRef$current6;
1081
1083
 
1082
- (_markerRef$current4 = markerRef.current) === null || _markerRef$current4 === void 0 ? void 0 : _markerRef$current4.setPosition(position);
1084
+ (_markerRef$current6 = markerRef.current) === null || _markerRef$current6 === void 0 ? void 0 : _markerRef$current6.setPosition(position);
1083
1085
  }, [position]);
1084
1086
  React.useEffect(function () {
1085
- var _markerRef$current5;
1087
+ var _markerRef$current7;
1086
1088
 
1087
- (_markerRef$current5 = markerRef.current) === null || _markerRef$current5 === void 0 ? void 0 : _markerRef$current5.setVisible(visible);
1089
+ (_markerRef$current7 = markerRef.current) === null || _markerRef$current7 === void 0 ? void 0 : _markerRef$current7.setVisible(visible);
1088
1090
  }, [visible]);
1089
1091
  React.useEffect(function () {
1090
- var _markerRef$current6;
1092
+ var _markerRef$current8;
1091
1093
 
1092
- anchor != undefined && ((_markerRef$current6 = markerRef.current) === null || _markerRef$current6 === void 0 ? void 0 : _markerRef$current6.setAnchor(anchor));
1094
+ anchor != undefined && ((_markerRef$current8 = markerRef.current) === null || _markerRef$current8 === void 0 ? void 0 : _markerRef$current8.setAnchor(anchor));
1093
1095
  }, [anchor]);
1094
1096
  React.useEffect(function () {
1095
- var _markerRef$current7;
1097
+ var _markerRef$current9;
1096
1098
 
1097
- labelAnchor != undefined && ((_markerRef$current7 = markerRef.current) === null || _markerRef$current7 === void 0 ? void 0 : _markerRef$current7.setLabelAnchor(labelAnchor));
1099
+ labelAnchor != undefined && ((_markerRef$current9 = markerRef.current) === null || _markerRef$current9 === void 0 ? void 0 : _markerRef$current9.setLabelAnchor(labelAnchor));
1098
1100
  }, [labelAnchor]);
1099
1101
  React.useEffect(function () {
1100
- var _markerRef$current8;
1102
+ var _markerRef$current10;
1101
1103
 
1102
- icon != undefined && ((_markerRef$current8 = markerRef.current) === null || _markerRef$current8 === void 0 ? void 0 : _markerRef$current8.setIcon(icon));
1104
+ icon != undefined && ((_markerRef$current10 = markerRef.current) === null || _markerRef$current10 === void 0 ? void 0 : _markerRef$current10.setIcon(icon));
1103
1105
  }, [icon]);
1104
1106
  React.useEffect(function () {
1105
- var _markerRef$current9;
1107
+ var _markerRef$current11;
1106
1108
 
1107
- elevation != undefined && ((_markerRef$current9 = markerRef.current) === null || _markerRef$current9 === void 0 ? void 0 : _markerRef$current9.setElevation(elevation));
1109
+ elevation != undefined && ((_markerRef$current11 = markerRef.current) === null || _markerRef$current11 === void 0 ? void 0 : _markerRef$current11.setElevation(elevation));
1108
1110
  }, [elevation]);
1109
1111
  React.useEffect(function () {
1110
- var _markerRef$current10;
1112
+ var _markerRef$current12;
1111
1113
 
1112
- rotation != undefined && ((_markerRef$current10 = markerRef.current) === null || _markerRef$current10 === void 0 ? void 0 : _markerRef$current10.setRotation(rotation));
1114
+ rotation != undefined && ((_markerRef$current12 = markerRef.current) === null || _markerRef$current12 === void 0 ? void 0 : _markerRef$current12.setRotation(rotation));
1113
1115
  }, [rotation]);
1114
1116
  React.useEffect(function () {
1115
- var _markerRef$current11;
1117
+ var _markerRef$current13;
1116
1118
 
1117
- title != undefined && ((_markerRef$current11 = markerRef.current) === null || _markerRef$current11 === void 0 ? void 0 : _markerRef$current11.setTitle(title));
1119
+ title != undefined && ((_markerRef$current13 = markerRef.current) === null || _markerRef$current13 === void 0 ? void 0 : _markerRef$current13.setTitle(title));
1118
1120
  }, [title]);
1119
1121
  React.useEffect(function () {
1120
- var _markerRef$current12;
1122
+ var _markerRef$current14;
1121
1123
 
1122
- snippet != undefined && ((_markerRef$current12 = markerRef.current) === null || _markerRef$current12 === void 0 ? void 0 : _markerRef$current12.setSnippet(snippet));
1124
+ snippet != undefined && ((_markerRef$current14 = markerRef.current) === null || _markerRef$current14 === void 0 ? void 0 : _markerRef$current14.setSnippet(snippet));
1123
1125
  }, [snippet]);
1124
1126
  React.useEffect(function () {
1125
- var _markerRef$current13;
1127
+ var _markerRef$current15;
1126
1128
 
1127
- windowAnchor != undefined && ((_markerRef$current13 = markerRef.current) === null || _markerRef$current13 === void 0 ? void 0 : _markerRef$current13.setWindowAnchor(windowAnchor));
1129
+ windowAnchor != undefined && ((_markerRef$current15 = markerRef.current) === null || _markerRef$current15 === void 0 ? void 0 : _markerRef$current15.setWindowAnchor(windowAnchor));
1128
1130
  }, [windowAnchor]);
1129
1131
  React.useEffect(function () {
1130
- var _markerRef$current14;
1132
+ var _markerRef$current16;
1131
1133
 
1132
- zIndex != undefined && ((_markerRef$current14 = markerRef.current) === null || _markerRef$current14 === void 0 ? void 0 : _markerRef$current14.setZIndex(zIndex));
1134
+ zIndex != undefined && ((_markerRef$current16 = markerRef.current) === null || _markerRef$current16 === void 0 ? void 0 : _markerRef$current16.setZIndex(zIndex));
1133
1135
  }, [zIndex]);
1134
1136
  React.useEffect(function () {
1135
- var _markerRef$current15;
1137
+ var _markerRef$current17;
1136
1138
 
1137
- label != undefined && ((_markerRef$current15 = markerRef.current) === null || _markerRef$current15 === void 0 ? void 0 : _markerRef$current15.setLabel(label));
1139
+ label != undefined && ((_markerRef$current17 = markerRef.current) === null || _markerRef$current17 === void 0 ? void 0 : _markerRef$current17.setLabel(label));
1138
1140
  }, [label]);
1139
1141
  React.useEffect(function () {
1140
- var _markerRef$current16;
1142
+ var _markerRef$current18;
1141
1143
 
1142
- draggable != undefined && ((_markerRef$current16 = markerRef.current) === null || _markerRef$current16 === void 0 ? void 0 : _markerRef$current16.setDraggable(draggable));
1144
+ draggable != undefined && ((_markerRef$current18 = markerRef.current) === null || _markerRef$current18 === void 0 ? void 0 : _markerRef$current18.setDraggable(draggable));
1143
1145
  }, [draggable]);
1144
1146
  React.useEffect(function () {
1145
- var _markerRef$current17;
1147
+ var _markerRef$current19;
1146
1148
 
1147
- iconView != undefined && ((_markerRef$current17 = markerRef.current) === null || _markerRef$current17 === void 0 ? void 0 : _markerRef$current17.setIconView(iconView));
1149
+ iconView != undefined && ((_markerRef$current19 = markerRef.current) === null || _markerRef$current19 === void 0 ? void 0 : _markerRef$current19.setIconView(iconView));
1148
1150
  }, [iconView]);
1149
1151
  React.useEffect(function () {
1150
- var _markerRef$current18;
1152
+ var _markerRef$current20;
1151
1153
 
1152
- userInteractionEnabled != undefined && ((_markerRef$current18 = markerRef.current) === null || _markerRef$current18 === void 0 ? void 0 : _markerRef$current18.setUserInteraction(userInteractionEnabled));
1154
+ userInteractionEnabled != undefined && ((_markerRef$current20 = markerRef.current) === null || _markerRef$current20 === void 0 ? void 0 : _markerRef$current20.setUserInteraction(userInteractionEnabled));
1153
1155
  }, [userInteractionEnabled]);
1154
1156
  React.useEffect(function () {
1155
- var _markerRef$current19;
1157
+ var _markerRef$current21;
1156
1158
 
1157
- icon != undefined && ((_markerRef$current19 = markerRef.current) === null || _markerRef$current19 === void 0 ? void 0 : _markerRef$current19.setIcon(new map4d.Icon(icon.width, icon.height, icon.url)));
1159
+ icon != undefined && ((_markerRef$current21 = markerRef.current) === null || _markerRef$current21 === void 0 ? void 0 : _markerRef$current21.setIcon(new map4d.Icon(icon.width, icon.height, icon.url)));
1158
1160
  }, [icon]);
1159
1161
  React.useEffect(function () {
1160
- var _markerRef$current20;
1162
+ var _markerRef$current22;
1161
1163
 
1162
- props.infoWindow != undefined && ((_markerRef$current20 = markerRef.current) === null || _markerRef$current20 === void 0 ? void 0 : _markerRef$current20.setInfoWindow(props.infoWindow));
1164
+ props.infoWindow != undefined && ((_markerRef$current22 = markerRef.current) === null || _markerRef$current22 === void 0 ? void 0 : _markerRef$current22.setInfoWindow(props.infoWindow));
1163
1165
  }, [props.infoWindow]);
1164
1166
  React.useEffect(function () {
1165
- var _markerRef$current21;
1167
+ var _markerRef$current23;
1166
1168
 
1167
- props.infoContents != undefined && ((_markerRef$current21 = markerRef.current) === null || _markerRef$current21 === void 0 ? void 0 : _markerRef$current21.setInfoContents(props.infoContents));
1169
+ props.infoContents != undefined && ((_markerRef$current23 = markerRef.current) === null || _markerRef$current23 === void 0 ? void 0 : _markerRef$current23.setInfoContents(props.infoContents));
1168
1170
  }, [props.infoContents]);
1169
1171
  React.useEffect(function () {
1170
1172
  if (props.showInfoWindow != undefined) {
1171
- props.showInfoWindow ? markerRef.current.showInfoWindow() : markerRef.current.hideInfoWindow();
1173
+ var _markerRef$current24, _markerRef$current25;
1174
+
1175
+ props.showInfoWindow ? (_markerRef$current24 = markerRef.current) === null || _markerRef$current24 === void 0 ? void 0 : _markerRef$current24.showInfoWindow() : (_markerRef$current25 = markerRef.current) === null || _markerRef$current25 === void 0 ? void 0 : _markerRef$current25.hideInfoWindow();
1172
1176
  }
1173
1177
  }, [props.showInfoWindow]);
1174
1178
  return null;