update draw line and shape
Some checks failed
Test / test (push) Has been cancelled

This commit is contained in:
2026-06-21 06:31:18 +02:00
parent 365a15c32a
commit 064c9b5758
9 changed files with 551 additions and 175 deletions

View File

@@ -117,14 +117,14 @@
return false;
}
function zonesAtPoint(zones, px, py) {
function zonesAtPoint(zones, px, py, mapMeta = null) {
const list = Array.isArray(zones) ? zones : [];
const hits = [];
for (let i = list.length - 1; i >= 0; i--) {
const z = list[i];
if (!isAdvancedZoneType(z?.type) || !z.points?.length) continue;
if (z.type === TYPES.directional_line) {
const width = Number(z.line_width) || 8;
const width = window.MapObjects?.zoneLineWidthPx(z, mapMeta) ?? 8;
if (pointNearPolyline(px, py, z.points, width / 2 + 4)) hits.push(z);
continue;
}