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

@ -5509,8 +5509,8 @@
<div id="markersBottom">
<button id="markersOverviewRefresh" data-tip="Refresh the Overview screen" class="icon-cw"></button>
<select id="addedMarkerType">
<option value="" selected>empty marker</option>
<select id="addedMarkerType" style="width: 40px">
<option value="" selected>empty marker</option>
</select>
<button
id="markersAddFromOverview"

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 = [