fix: сохранить точную активацию маркера (#564)

Issue: #564
User-Visible: yes
This commit is contained in:
Sergey Matyunin
2026-09-14 02:57:50 +03:00
parent 6de854a03d
commit f9ed9d2ae8
50 changed files with 443 additions and 402 deletions
+4 -2
View File
@@ -265,8 +265,10 @@ export class DeviceHitController {
public click<T extends RenderedDeviceHitItem>(
root: ParentNode, devices: readonly T[], space: string | null, ev: Event, fallback: T,
): T {
if (ev instanceof KeyboardEvent) return fallback;
const point = ev as PointerEvent;
// Keyboard/programmatic activation is already bound to an exact marker.
// Only a real pointer click carries coordinates that need arbitration.
if (!(ev instanceof PointerEvent)) return fallback;
const point = ev;
const id = Number.isFinite(point.pointerId) ? this.pointers.consumeClick(point.pointerId) : null;
return this.byId(devices, space, id)
|| this.at(root, devices, space, point.clientX, point.clientY)
+1 -1
View File
@@ -5742,7 +5742,7 @@ export class HouseplanCard extends LitElement {
const presentation = this._devicePresentation(d, showLqi);
const disabledReason = presentation.disabledReason;
const ghostLabel = presentation.haDisabled
? this._t((`marker.ha_disabled_${disabledReason}`) as any)
? this._t((`marker.ha_disabled_${disabledReason}`) as I18nKey)
: d.userHidden ? this._t('marker.hidden_ghost') : d.name;
const metrics = [
d.model,