Skip to main content

Function: findElementAtPoint()

findElementAtPoint(elements, point, sizeProvider): Element | undefined

Returns the first element from specified elements which bounding box includes the specified point.

If the specified point is at the edge of a bounding box, it is considered to be part of it.

Parameters

ParameterTypeDescription

elements

readonly Element[]

an array of diagram elements to search

point

Vector

point on a diagram in paper coordinates

sizeProvider

SizeProvider

element size provider to compute bounding boxes

Returns

Element | undefined

Defined in

diagram/geometry.ts:464