Interface LegacyShapeComponentProps<T>

Props for the LegacyShapeComponent.

interface LegacyShapeComponentProps<T> {
    ctx?: JsxWrapperProps<T>;
    labelProperty?: string;
    labelStrokeWidth?: string;
    obj: ObjectData;
    shapeLibrary: ShapeLibraryImpl<ObjectData>;
    showLabels?: boolean;
}

Type Parameters

  • T extends Vertex

Properties

Context for the vertex, as passed in by the SurfaceComponent. From 6.41.0 this approach is preferred to setting obj and shapeLibrary, and in 7.x only this approach will be supported.

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".

obj: ObjectData

Backing data for the vertex. If you do not provide ctx, this is required.

As of 6.50.0 when using the jsx mapping in your view you should pass in the ctx to this component.

shapeLibrary: ShapeLibraryImpl<ObjectData>

ShapeLibrary to use. If you do not provide ctx, this is required.

As of 6.41.0 when using the jsx mapping in your view you should pass in the ctx to this component.

showLabels?: boolean

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

Version :