Add: add icons to contextmenu elements

This commit is contained in:
ISA
2024-05-07 13:42:54 +02:00
parent 91ef7d6db9
commit 51b90410d9
2 changed files with 17 additions and 5 deletions

View File

@@ -289,16 +289,28 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
zoomControl: false,
contextmenu: true,
contextmenuItems: [
{ text: "Station hinzufügen", callback: addStationCallback },
{
text: "Station hinzufügen",
icon: "img/add_station.png",
callback: addStationCallback,
},
{
text: "Koordinaten",
icon: "img/screen_same.png",
icon: "img/not_listed_location.png",
callback: showCoordinates,
},
"-", // Divider
{ text: "Reinzoomen", callback: zoomIn },
{ text: "Rauszoomen", callback: zoomOut },
{ text: "Hier zentrieren", callback: centerHere },
{ text: "Reinzoomen", icon: "img/zoom_in.png", callback: zoomIn },
{
text: "Rauszoomen",
icon: "img/zoom_out.png",
callback: zoomOut,
},
{
text: "Hier zentrieren",
icon: "img/center_focus.png",
callback: centerHere,
},
],
});

BIN
public/img/add_station.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB