datastake-daf 0.6.398 → 0.6.400
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/components/index.js
CHANGED
|
@@ -18802,14 +18802,18 @@ const useMap$1 = ({
|
|
|
18802
18802
|
setData(null);
|
|
18803
18803
|
}
|
|
18804
18804
|
}
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
|
|
18809
|
-
|
|
18810
|
-
|
|
18811
|
-
|
|
18812
|
-
|
|
18805
|
+
if (mapRef && polylinesRef.current.length && type === "chain") {
|
|
18806
|
+
polylinesRef.current.forEach(polyline => {
|
|
18807
|
+
if (mapRef.hasLayer(polyline)) {
|
|
18808
|
+
mapRef.removeLayer(polyline);
|
|
18809
|
+
}
|
|
18810
|
+
if (polyline.remove) {
|
|
18811
|
+
polyline.remove();
|
|
18812
|
+
}
|
|
18813
|
+
});
|
|
18814
|
+
polylinesRef.current = [];
|
|
18815
|
+
}
|
|
18816
|
+
}, [allData, type]);
|
|
18813
18817
|
React.useEffect(() => {
|
|
18814
18818
|
if (allData) {
|
|
18815
18819
|
setData(filterValidGPS$1(allData));
|
package/package.json
CHANGED
|
@@ -269,13 +269,18 @@ export const useMap = ({
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
272
|
+
if (mapRef && polylinesRef.current.length && type === "chain") {
|
|
273
|
+
polylinesRef.current.forEach((polyline) => {
|
|
274
|
+
if (mapRef.hasLayer(polyline)) {
|
|
275
|
+
mapRef.removeLayer(polyline);
|
|
276
|
+
}
|
|
277
|
+
if (polyline.remove) {
|
|
278
|
+
polyline.remove();
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
polylinesRef.current = [];
|
|
282
|
+
}
|
|
283
|
+
}, [allData, type]);
|
|
279
284
|
|
|
280
285
|
useEffect(() => {
|
|
281
286
|
if (allData) {
|