changed marker type selection behavior

This commit is contained in:
Elad Bernard Haviv 2023-08-04 10:48:01 +03:00
parent 1b24991a42
commit f50e277a78
2 changed files with 6 additions and 3 deletions

View file

@ -25,11 +25,14 @@ function overviewMarkers() {
position: {my: "right top", at: "right-10 top+10", of: "svg", collision: "fit"}
});
const markerTypeInput = document.getElementById("addedMarkerType");
markerTypeInput.addEventListener("change", toggleAddMarker);
Markers.getConfig().forEach(markerConfig => {
const option = document.createElement("option");
option.setAttribute("value", markerConfig.type);
option.textContent = `${markerConfig.icon} ${markerConfig.type}`;
document.getElementById("addedMarkerType").appendChild(option);
markerTypeInput.appendChild(option);
});
const listeners = [