interface ShapeConstructorOptions {
    afterInsertPoint?: PostHook<InsertPointHook>;
    afterRemovePoint?: PostHook<RemovePointHook>;
    afterUpdatePoint?: PostHook<UpdatePointHook>;
    beforeInsertPoint?: PreHook<InsertPointHook>;
    beforeRemovePoint?: PreHook<RemovePointHook>;
    beforeUpdatePoint?: PreHook<UpdatePointHook>;
    borderWidth?: number;
    color?: ColorRepresentation;
    floorElevation?: number;
    fontSize?: number;
    fontWeight?: ShapeFontWeight;
    labelOpacity?: number;
    lineLabelFormatter?: LineLabelFormatter;
    lineWidth?: number;
    pickableLabels?: boolean;
    segmentLabelFormatter?: SegmentLabelFormatter;
    showFloorLine?: boolean;
    showFloorVertices?: boolean;
    showLine?: boolean;
    showLineLabel?: boolean;
    showSegmentLabels?: boolean;
    showSurface?: boolean;
    showSurfaceLabel?: boolean;
    showVertexLabels?: boolean;
    showVerticalLineLabels?: boolean;
    showVerticalLines?: boolean;
    showVertices?: boolean;
    surfaceLabelFormatter?: SurfaceLabelFormatter;
    surfaceLabelPlacement?: SurfaceLabelPlacement;
    surfaceOpacity?: number;
    vertexLabelFormatter?: VertexLabelFormatter;
    vertexRadius?: number;
    verticalLineLabelFormatter?: VerticalLineLabelFormatter;
}

Properties

afterInsertPoint?: PostHook<InsertPointHook>

An optional hook to be called just after a point is inserted.

afterRemovePoint?: PostHook<RemovePointHook>

An optional hook to be called just after a point is removed.

afterUpdatePoint?: PostHook<UpdatePointHook>

An optional hook to be called just after a point is updated.

beforeInsertPoint?: PreHook<InsertPointHook>

An optional hook to be called just before a point is inserted. If the hook returns false, the point is not inserted.

beforeRemovePoint?: PreHook<RemovePointHook>

An optional hook to be called just before a point is removed. If the hook returns false, the point is not removed.

beforeUpdatePoint?: PreHook<UpdatePointHook>

An optional hook to be called just before a point is updated. If the hook returns false, the point is not updated.

borderWidth?: number

The width, in pixels, of the border around vertices and lines.

Default Value

{@link DEFAULT_BORDER_WIDTH}

The main color of the shape. Affects lines, vertices, surfaces and labels.

Default Value

{@link DEFAULT_COLOR}
floorElevation?: number

The floor elevation, in meters.

Default Value

0
fontSize?: number

The label font size.

Default Value

{@link DEFAULT_FONT_SIZE}
fontWeight?: ShapeFontWeight

The label font weight.

Default Value

'bold'

labelOpacity?: number

The specific opacity of the labels.

Default Value

1
lineLabelFormatter?: LineLabelFormatter

A custom formatter for the line label.

lineWidth?: number

The width, in pixels, of lines.

Default Value

{@link DEFAULT_LINE_WIDTH}
pickableLabels?: boolean

Make labels pickable.

Default Value

false
segmentLabelFormatter?: SegmentLabelFormatter

A custom formatter for segment labels.

showFloorLine?: boolean

Shows the line that is the vertical projection of the line on the plane at the floorElevation.

Default Value

{@link DEFAULT_SHOW_FLOOR_LINE}
showFloorVertices?: boolean

Shows floor vertices.

Default Value

{@link DEFAULT_SHOW_FLOOR_VERTICES}
showLine?: boolean

Shows the line that connects each vertex.

Default Value

{@link DEFAULT_SHOW_LINE}
showLineLabel?: boolean

Display a label for the entire line.

Default Value

false
showSegmentLabels?: boolean

Display labels for each segment of the line.

Default Value

false
showSurface?: boolean

Show the surface polygon.

Default Value

{@link DEFAULT_SHOW_SURFACE}
showSurfaceLabel?: boolean

Display a label for the surface.

Default Value

false
showVertexLabels?: boolean

Display a label for each vertex.

Default Value

false
showVerticalLineLabels?: boolean

Display labels for vertical lines.

Default Value

false
showVerticalLines?: boolean

Show vertical lines that connect each vertex to each floor vertex.

Default Value

{@link DEFAULT_SHOW_VERTICAL_LINES}
showVertices?: boolean

Show vertices.

Default Value

{@link DEFAULT_SHOW_VERTICES}
surfaceLabelFormatter?: SurfaceLabelFormatter

A custom formatter for the surface label.

surfaceLabelPlacement?: SurfaceLabelPlacement

An optional function to compute the location of the surface label.

surfaceOpacity?: number

The opacity of the surface.

Default Value

{@link DEFAULT_SURFACE_OPACITY}
vertexLabelFormatter?: VertexLabelFormatter

A custom formatter for the vertex labels.

vertexRadius?: number

The radius, in pixels, of vertices.

Default Value

{@link DEFAULT_VERTEX_RADIUS}
verticalLineLabelFormatter?: VerticalLineLabelFormatter

A custom formatter for vertical line labels.