@vtx/modals2 5.0.5 → 5.0.6
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.
|
@@ -137,7 +137,7 @@ export default function VmOlMap(_ref) {
|
|
|
137
137
|
var points = formatData(mapPoints);
|
|
138
138
|
var polygons = formatData(mapPolygons, geometryType);
|
|
139
139
|
function fitView() {
|
|
140
|
-
if (mapRef.current && ((mapPoints === null || mapPoints === void 0 ? void 0 : mapPoints.length) > 0 || (mapPolygons === null || mapPolygons === void 0 ? void 0 : mapPolygons.length) > 0)) {
|
|
140
|
+
if (mapRef.current.hasOwnProperty('tk') && ((mapPoints === null || mapPoints === void 0 ? void 0 : mapPoints.length) > 0 || (mapPolygons === null || mapPolygons === void 0 ? void 0 : mapPolygons.length) > 0)) {
|
|
141
141
|
var _mapRef$current, _polygons$data, _points$data;
|
|
142
142
|
(_mapRef$current = mapRef.current) === null || _mapRef$current === void 0 || _mapRef$current.fitView({
|
|
143
143
|
geometryInfo: ((polygons === null || polygons === void 0 || (_polygons$data = polygons.data) === null || _polygons$data === void 0 ? void 0 : _polygons$data[0]) || (points === null || points === void 0 || (_points$data = points.data) === null || _points$data === void 0 ? void 0 : _points$data[0])).geometryInfo
|
|
@@ -44,7 +44,9 @@ var BaseInfo = function BaseInfo(props) {
|
|
|
44
44
|
return {
|
|
45
45
|
id: "mapPoints_".concat(index),
|
|
46
46
|
lng: item[0],
|
|
47
|
-
lat: item[1]
|
|
47
|
+
lat: item[1],
|
|
48
|
+
icon: info === null || info === void 0 ? void 0 : info.gisIconCode,
|
|
49
|
+
color: info === null || info === void 0 ? void 0 : info.gisIconColor
|
|
48
50
|
};
|
|
49
51
|
})) || [];
|
|
50
52
|
}
|
|
@@ -62,11 +62,15 @@ var VtxDefaultModal = function VtxDefaultModal(props) {
|
|
|
62
62
|
return ele.key !== 'metering';
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
if (tabsList.findIndex(function (ele) {
|
|
66
|
+
return ele.key === 'video';
|
|
67
|
+
}) > -1) {
|
|
68
|
+
if ((channels === null || channels === void 0 ? void 0 : channels.length) < 1) {
|
|
69
|
+
tabsList = tabsList.filter(function (ele) {
|
|
70
|
+
return ele.key !== 'video';
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
70
74
|
return tabsList;
|
|
71
75
|
}, [JSON.stringify(tabsData), JSON.stringify(channels), JSON.stringify(detail)]);
|
|
72
76
|
var param = {
|