Linien Tooltip offset auf 20, damit der Cursor nicht drüber steht
This commit is contained in:
@@ -498,7 +498,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
|||||||
};
|
};
|
||||||
fetchData();
|
fetchData();
|
||||||
}, []);
|
}, []);
|
||||||
|
//--------------------------------------------
|
||||||
//Tooltip an mouse position anzeigen für die Linien
|
//Tooltip an mouse position anzeigen für die Linien
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!map) return;
|
if (!map) return;
|
||||||
@@ -517,7 +517,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
|||||||
permanent: false,
|
permanent: false,
|
||||||
direction: "auto",
|
direction: "auto",
|
||||||
sticky: true,
|
sticky: true,
|
||||||
offset: [0, 10],
|
offset: [20, 0],
|
||||||
pane: "tooltipPane",
|
pane: "tooltipPane",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -561,7 +561,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
|||||||
setMarkers(newMarkers);
|
setMarkers(newMarkers);
|
||||||
setPolylines(newPolylines);
|
setPolylines(newPolylines);
|
||||||
}, [map, linePositions, lineColors, tooltipContents, newPoint, newCoords, tempMarker]);
|
}, [map, linePositions, lineColors, tooltipContents, newPoint, newCoords, tempMarker]);
|
||||||
// }, [map, linePositions, lineColors, tooltipContents, newPoint, newCoords, tempMarker]);
|
|
||||||
//--------------------------------------------
|
//--------------------------------------------
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -592,6 +592,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}, [map]);
|
}, [map]);
|
||||||
|
//--------------------------------------------
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (selectedArea && map) {
|
if (selectedArea && map) {
|
||||||
@@ -608,12 +609,6 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
|||||||
}
|
}
|
||||||
}, [zoomTrigger, map]);
|
}, [zoomTrigger, map]);
|
||||||
|
|
||||||
/* useEffect(() => {
|
|
||||||
if (mapRef.current && !map) {
|
|
||||||
initializeMap(mapRef, setMap, setOms, setMenuItemAdded, addItemsToMapContextMenu, hasRights);
|
|
||||||
}
|
|
||||||
}, [mapRef, map, hasRights, addItemsToMapContextMenu]); */
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (map && poiLayerRef.current && isPoiTypLoaded && !menuItemAdded && isRightsLoaded) {
|
if (map && poiLayerRef.current && isPoiTypLoaded && !menuItemAdded && isRightsLoaded) {
|
||||||
addItemsToMapContextMenu(map, menuItemAdded, setMenuItemAdded, hasRights, setShowPopup, setPopupCoordinates);
|
addItemsToMapContextMenu(map, menuItemAdded, setMenuItemAdded, hasRights, setShowPopup, setPopupCoordinates);
|
||||||
@@ -638,18 +633,6 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
|||||||
fetchPriorityConfig();
|
fetchPriorityConfig();
|
||||||
}, []);
|
}, []);
|
||||||
//--------------------------------------------
|
//--------------------------------------------
|
||||||
/* useEffect(() => {
|
|
||||||
if (!map) return;
|
|
||||||
|
|
||||||
markers.forEach((marker) => marker.remove());
|
|
||||||
polylines.forEach((polyline) => polyline.remove());
|
|
||||||
|
|
||||||
const { markers: newMarkers, polylines: newPolylines } = setupPolylines(map, linePositions, lineColors, tooltipContents, setNewCoords, tempMarker, currentZoom, currentCenter);
|
|
||||||
|
|
||||||
setMarkers(newMarkers);
|
|
||||||
setPolylines(newPolylines);
|
|
||||||
}, [map, linePositions, lineColors, tooltipContents, newPoint, newCoords, tempMarker, currentZoom, currentCenter]); // Ensure currentZoom and currentCenter are included in the dependency array */
|
|
||||||
//--------------------------------------------
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (mapRef.current && !map) {
|
if (mapRef.current && !map) {
|
||||||
initializeMap(mapRef, setMap, setOms, setMenuItemAdded, addItemsToMapContextMenu, hasRights, setPolylineEventsDisabled);
|
initializeMap(mapRef, setMap, setOms, setMenuItemAdded, addItemsToMapContextMenu, hasRights, setPolylineEventsDisabled);
|
||||||
|
|||||||
Reference in New Issue
Block a user