Interface ShapeComponentProps

Props for the ShapeComponent. At the minimum you should pass in the ctx that the Surface provides to the mapping in your viewOptions.

interface ShapeComponentProps {
    ctx: JsxWrapperProps<Vertex>;
    labelProperty?: string;
    labelStrokeWidth?: string;
    showLabels?: boolean;
}

Properties

ctx: JsxWrapperProps<Vertex>

Context for the vertex, as passed in by the SurfaceComponent.

labelProperty?: string

The name of the property that identifies some vertex's label. Defaults to "label".

labelStrokeWidth?: string

Optional stroke width to use for labels. Defaults to "0.25px".

showLabels?: boolean

Defaults to false. If true, a label will be written on the shape (using an SVG text element).

Version :