Новый стиль добавил
This commit is contained in:
parent
b324556fca
commit
483c456b76
@ -350,14 +350,13 @@
|
||||
extentInteraction = new ol.interaction.Extent({
|
||||
condition: ol.events.condition.altKeyOnly
|
||||
})
|
||||
{#map.on("pointerdown", handlePointerDown);#}
|
||||
{#map.on("pointerup", handlePointerUp);#}
|
||||
|
||||
|
||||
// Дефолтные значения стиля
|
||||
const DEFAULT_STYLE = {
|
||||
"stroke-color": "#0000ff", // Синий цвет обводки
|
||||
"stroke-width": 2, // Толщина обводки
|
||||
"stroke-color": "#0000ff",
|
||||
"stroke-width": 2,
|
||||
'fill-color': "#fff"
|
||||
};
|
||||
|
||||
// Функция для обновления стиля слоя
|
||||
@ -389,6 +388,8 @@
|
||||
return "Цвет линии:"
|
||||
case "stroke-width":
|
||||
return "Ширина линии:"
|
||||
case "fill-color":
|
||||
return "Цвет заливки (Для замкнутых фигур)"
|
||||
}
|
||||
}
|
||||
|
||||
@ -436,6 +437,13 @@
|
||||
input.value = rgbToHex(style[property]) || DEFAULT_STYLE[property];
|
||||
input.className = "form-control";
|
||||
}
|
||||
else if (property === "fill-color") {
|
||||
input = document.createElement("input");
|
||||
input.type = "color";
|
||||
input.id = property;
|
||||
input.value = rgbToHex(style[property]) || DEFAULT_STYLE[property];
|
||||
input.className = "form-control";
|
||||
}
|
||||
|
||||
col.appendChild(label);
|
||||
col.appendChild(input);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user