contextmenu, manchmal geht manchmal nicht, Timing Problem
This commit is contained in:
@@ -1,24 +1,10 @@
|
||||
// hooks/usePolylineTooltipLayer.js
|
||||
import { useEffect } from "react";
|
||||
import L from "leaflet";
|
||||
import { setupPolylines } from "../utils/setupPolylines";
|
||||
import { setupPolylines } from "../utils/polylines/setupPolylines";
|
||||
|
||||
//Tooltip an mouse position anzeigen für die Linien
|
||||
export const usePolylineTooltipLayer = (
|
||||
map,
|
||||
markers,
|
||||
polylines,
|
||||
setMarkers,
|
||||
setPolylines,
|
||||
linePositions,
|
||||
lineColors,
|
||||
tooltipContents,
|
||||
setNewCoords,
|
||||
tempMarker,
|
||||
polylineVisible,
|
||||
newPoint,
|
||||
newCoords
|
||||
) => {
|
||||
//Tooltip an mouse position anzeigen für die Linien
|
||||
export const usePolylineTooltipLayer = (map, markers, polylines, setMarkers, setPolylines, linePositions, lineColors, tooltipContents, setNewCoords, tempMarker, polylineVisible, newPoint, newCoords) => {
|
||||
useEffect(() => {
|
||||
if (!map) return;
|
||||
|
||||
@@ -81,4 +67,4 @@ export const usePolylineTooltipLayer = (
|
||||
setMarkers(newMarkers);
|
||||
setPolylines(newPolylines);
|
||||
}, [map, linePositions, lineColors, tooltipContents, newPoint, newCoords, tempMarker, polylineVisible]);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user