mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.4.62
This commit is contained in:
parent
ffc3c980f7
commit
03170abeab
2 changed files with 13 additions and 4 deletions
|
|
@ -203,7 +203,16 @@ function editMarker() {
|
|||
|
||||
function changeMarkerSize() {
|
||||
const id = elSelected.attr("data-id");
|
||||
document.querySelectorAll("use[data-id='"+id+"']").forEach(e => e.dataset.size = markerSize.value);
|
||||
document.querySelectorAll("use[data-id='"+id+"']").forEach(e => {
|
||||
const x = +e.dataset.x, y = +e.dataset.y;
|
||||
const desired = e.dataset.size = +markerSize.value;
|
||||
const size = Math.max(desired * 5 + 25 / scale, 1);
|
||||
|
||||
e.setAttribute("x", x - size / 2);
|
||||
e.setAttribute("y", y - size / 2);
|
||||
e.setAttribute("width", size);
|
||||
e.setAttribute("height", size);
|
||||
});
|
||||
invokeActiveZooming();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue