From a231f64837e2c3f925f514c25fa6bf99b08ae0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=D1=81=20=D0=A1=D1=83=D0=BB=D1=82?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Wed, 23 Sep 2026 13:41:07 +0300 Subject: [PATCH] =?UTF-8?q?fix(gps):=20iconShape=20=D0=B7=D0=B0=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=20=D0=BE=D1=82=20=D1=82=D0=BE=D1=87=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=D0=B2=D1=8F=D0=B7=D0=BA=D0=B8=20=D0=BC=D0=B0?= =?UTF-8?q?=D1=80=D0=BA=D0=B5=D1=80=D0=B0=20(anchor),=20=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D0=BE=D1=82=20=D1=83=D0=B3=D0=BB=D0=B0=20=E2=80=94=20?= =?UTF-8?q?=D0=B0=D0=BA=D1=82=D0=B8=D0=B2=D0=BD=D0=B0=D1=8F=20=D0=BE=D0=B1?= =?UTF-8?q?=D0=BB=D0=B0=D1=81=D1=82=D1=8C=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=80=D1=8B=D0=B2=D0=B0=D0=B5=D1=82=20=D0=BC=D0=B0=D1=80=D0=BA?= =?UTF-8?q?=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/gps/Yandex21Map.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/components/gps/Yandex21Map.tsx b/client/src/components/gps/Yandex21Map.tsx index 540991a..e6881ea 100644 --- a/client/src/components/gps/Yandex21Map.tsx +++ b/client/src/components/gps/Yandex21Map.tsx @@ -269,12 +269,14 @@ export function Yandex21Map({ iconLayout: ymaps.templateLayoutFactory.createClass(gpsMarkerHtml(m)), iconOffset: [-layout.anchorX, -layout.anchorY], // Активная область клика: без iconShape у кастомного iconLayout - // hit-test Яндекса не находит метку — клики уходят в events-pane + // hit-test Яндекса не находит метку — клики уходят в events-pane. + // Координаты iconShape — ОТ ТОЧКИ ПРИВЯЗКИ (anchor), а не от угла: + // прямоугольник [-anchor .. width-anchor] покрывает весь маркер. iconShape: { type: 'Rectangle', coordinates: [ - [0, 0], - [layout.width, layout.height], + [-layout.anchorX, -layout.anchorY], + [layout.width - layout.anchorX, layout.height - layout.anchorY], ], } as unknown as ymaps.IGeometryJson, ...(m.zIndex !== undefined ? { zIndex: m.zIndex } : {}),