Skip to content

entityAtPoint

entityAtPoint(x, y, root?): EntityId | null

Defined in: src/modules/render-dom/entity-at-point.ts:20

The entity whose node DomRenderer rendered at client coordinates (x, y), or null when nothing there belongs to an entity.

Asks the browser for the topmost element at the point (document.elementFromPoint) and walks up to the nearest ancestor carrying the renderer’s data-entity-id, so a click on a card’s title text still resolves to the card. Elements with pointer-events: none are skipped by the browser, which is how a dragged node avoids hiding the drop target beneath it.

Pass root to ignore entities rendered outside that element — when two renderers share a page, or when an overlay should not count.

number

number

Element

EntityId | null