Interface ShapeComponentProps

Props for the shape component that renders SVG shapes.

interface ShapeComponentProps {
    data: ObjectData;
    labelProperty?: string;
    labelStrokeWidth: number;
    showLabels?: boolean;
    surface: Surface;
    vertex: Node | Group;
}

Hierarchy

  • DOMAttributes<HTMLDivElement>
    • ShapeComponentProps

Properties

data: ObjectData

Backing data for the vertex. Required. This is passed in as a prop to a component used to render a node/group, so you can pass it straight through from the parent to this component.

labelProperty?: string

The name of the property containing each vertex's label. Defaults to label.

labelStrokeWidth: number

Stroke width to use on the text element rendering a label. Defaults to 1px.

showLabels?: boolean

Whether or not to show labels on each shape. Defaults to false.

surface: Surface

The surface that is rendering the vertex. Required. Again, this is passed in to the parent component.

vertex: Node | Group

Vertex to render. Required. This is passed in as a prop to a component used to render a node/group, so you can pass it straight through from the parent to this component.

Version :