Type alias TFlatLabelOptions

TFlatLabelOptions: {
    canvasBounds?: {
        align: "left" | "right" | "center";
        height: number;
        width: number;
        x: number;
        y: number;
    };
    text: string;
}

Control how a flat label looks

Type declaration

  • Optional canvasBounds?: {
        align: "left" | "right" | "center";
        height: number;
        width: number;
        x: number;
        y: number;
    }

    Set this if you want to label an arbitrary part of the Map. You will need to specify height as well.

    • align: "left" | "right" | "center"

      Whether the TextLabel should be anchored against the (x,y), or the opposite (horizontal) side of the box, or in the middle. It is * always vertically centered.

    • height: number

      The vertical space we have to fit the TextLabel.

    • width: number

      The horizontal space we have to fit the TextLabel.

    • x: number

      The x coordinate for the TextLabel anchor.

    • y: number

      The y coordinate for the TextLabel anchor.

  • text: string