Skip to content

@eightkk/vue-weave / core / graphNodesInPolygon

Function: graphNodesInPolygon() ​

graphNodesInPolygon(boxes, polygon): string[]

Defined in: src/core/graphLasso.ts:50

The IDs of the boxes whose centre lies inside a polygon (see graphPointInPolygon), in the iteration order of boxes. Use it with the boxes of a GraphLayout for a free-form (lasso) selection. A polygon with fewer than three vertices selects nothing. Throws RangeError for a non-finite polygon coordinate or box geometry.

Parameters ​

boxes ​

ReadonlyMap<string, GraphRect>

polygon ​

readonly GraphPoint[]

Returns ​

string[]

Released under the MIT License.