mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
draw markers - set init size fix
This commit is contained in:
parent
28f3828622
commit
01caf798a6
1 changed files with 1 additions and 1 deletions
|
|
@ -1563,7 +1563,7 @@ const getPin = (shape = "bubble", fill = "#fff", stroke = "#000") => {
|
||||||
function drawMarker(marker, rescale = 1) {
|
function drawMarker(marker, rescale = 1) {
|
||||||
const {i, icon, x, y, dx = 50, dy = 50, px = 12, size = 30, pin, fill, stroke} = marker;
|
const {i, icon, x, y, dx = 50, dy = 50, px = 12, size = 30, pin, fill, stroke} = marker;
|
||||||
const id = `marker${i}`;
|
const id = `marker${i}`;
|
||||||
const zoomSize = rescale ? Math.max(rn(size / 5 + 24 / scale, 2), 1) : 1;
|
const zoomSize = rescale ? Math.max(rn(size / 5 + 24 / scale, 2), 1) : size;
|
||||||
const viewX = rn(x - zoomSize / 2, 1);
|
const viewX = rn(x - zoomSize / 2, 1);
|
||||||
const viewY = rn(y - zoomSize, 1);
|
const viewY = rn(y - zoomSize, 1);
|
||||||
const pinHTML = getPin(pin, fill, stroke);
|
const pinHTML = getPin(pin, fill, stroke);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue