interface RVG · Factories

RvgHandleFactory

interface RvgHandleFactory

Creates handles, points the user can drag (see RvgHandle).

Properties

defaultZIndex

defaultZIndex: number

The z-index given to handles created from now on (default 1000; visuals start at 0).

Handles and visuals of a group are ordered together: a higher z-index is drawn on top and gets the pointer first; with equal z-index, the one created later is on top. With the defaults, handles stay above the visuals of their group, also above visuals created after them. To put a visual over a handle, give it a z-index above 1000. The z-index orders only siblings in the same group: a handle in a layer created before another layer stays below that layer's visuals.

Methods

disk

disk(style: string): RvgHandle

Creates a disk-shaped handle at the origin.

style
The visual style to apply to the handle.

Returns A handle instance.

disk(style: string, p: Point | VectorLike): RvgHandle

Creates a disk-shaped handle at the position of p.

The handle is a new pin pointing right (direction (1, 0)); it copies the position of p and is not linked to it.

style
The visual style to apply to the handle.
p
The point where the handle should be positioned.

Returns A handle instance.