Skip to main content
Version: 4.1

PolygonalSelectionRegion

PolygonalSelectionRegion is a component for selecting polygonal regions. The polygon geometry is represented by the g.Polygon.

The region can be drawn by the user using the pointer device or programmatically.

It extends the SelectionRegion.

constructor​

constructor(options?: PolygonalRegion.Options);

It implements all the options from the SelectionRegion and adds the following options:

threshold​

[optional] The threshold for simplifying the polygonal region. The higher the threshold, the more simplified (fewer points) the polygonal region will be. Default is 1.

const region = new PolygonalRegion({
paper,
threshold: 0.5,
});

Types​

Options​

The extended SelectionRegion options.

interface Options extends SelectionRegion.Options<g.Polygon> {
threshold?: number;
}

Polygon​

Represents the polygon geometry.

type Polygon = g.Polygon;

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub