BimCT SDK / WebGL2 Viewer
    Preparing search index...

    Type Alias LegendOptions

    Configuration options for the legend component.

    type LegendOptions = {
        worldPosition?: { x: number; y: number; z: number };
        scale?: { value: number; diff100: number };
        padding?: number;
        lineGap?: number;
        gap?: number;
        backgroundOpacity?: number;
        backgroundColor?: string;
        textColor?: string;
        textFontFamily?: string;
        textFontSize?: number;
        imageSize?: number;
        rotation?: number;
    }
    Index

    Properties

    worldPosition?: { x: number; y: number; z: number }

    World space position for the legend (3D coordinates). If not provided, legend will use screen coordinates.

    scale?: { value: number; diff100: number }

    Scale configuration for the legend. Contains the current scale value and difference per 100 units.

    padding?: number

    Padding around the legend content in pixels.

    10
    
    lineGap?: number

    Vertical gap between legend rows in pixels.

    5
    
    gap?: number

    Horizontal gap between icon and text in pixels.

    5
    
    backgroundOpacity?: number

    Background opacity of the legend (0.0 to 1.0).

    1
    
    backgroundColor?: string

    Background color of the legend.

    'white'
    
    textColor?: string

    Text color for legend labels.

    'black'
    
    textFontFamily?: string

    Font family for legend text.

    'Arial'
    
    textFontSize?: number

    Font size for legend text in pixels.

    12
    
    imageSize?: number

    Size of the legend icons in pixels (width and height).

    20
    
    rotation?: number

    Rotation angle of the legend in radians.

    0