HomeWeb Components API Reference - v0.8.1
    Preparing search index...

    Class ElementComponentElement

    The ElementComponentElement interface provides properties and methods for manipulating <pc-element> elements. The ElementComponentElement interface also inherits the properties and methods of the HTMLElement interface.

    Hierarchy (View Summary)

    Index

    Accessors

    • get autoFitHeight(): boolean

      Gets whether a text element automatically reduces its font size to fit its height.

      Returns boolean

      Whether the height is auto-fit.

    • set autoFitHeight(value: boolean): void

      Sets whether a text element should automatically reduce its font size (down to min-font-size) so the text fits within the element's height. Requires auto-height to be false.

      Parameters

      • value: boolean

        Whether to auto-fit the height.

      Returns void

    • get autoFitWidth(): boolean

      Gets whether a text element automatically reduces its font size to fit its width.

      Returns boolean

      Whether the width is auto-fit.

    • set autoFitWidth(value: boolean): void

      Sets whether a text element should automatically reduce its font size (down to min-font-size) so the text fits within the element's width. Requires auto-width to be false.

      Parameters

      • value: boolean

        Whether to auto-fit the width.

      Returns void

    • get autoHeight(): boolean

      Gets whether the element component should automatically adjust its height.

      Returns boolean

      Whether to automatically adjust the height.

    • set autoHeight(value: boolean): void

      Sets whether the element component should automatically adjust its height to the text content (text elements only).

      Parameters

      • value: boolean

        Whether to automatically adjust the height.

      Returns void

    • get autoWidth(): boolean

      Gets whether the element component should automatically adjust its width.

      Returns boolean

      Whether to automatically adjust the width.

    • set autoWidth(value: boolean): void

      Sets whether the element component should automatically adjust its width to the text content (text elements only).

      Parameters

      • value: boolean

        Whether to automatically adjust the width.

      Returns void

    • get enabled(): boolean

      Gets the enabled state of the component.

      Returns boolean

      The enabled state of the component.

    • set enabled(value: boolean): void

      Sets the enabled state of the component.

      Parameters

      • value: boolean

        The enabled state of the component.

      Returns void

    • get mask(): boolean

      Gets whether the element component is a mask.

      Returns boolean

      Whether the element is a mask.

    • set mask(value: boolean): void

      Sets whether the element component is a mask, clipping its descendants to its bounds (image elements only).

      Parameters

      • value: boolean

        Whether the element is a mask.

      Returns void

    • get maxFontSize(): number

      Gets the largest font size a text element may use when auto-fitting.

      Returns number

      The maximum font size.

    • set maxFontSize(value: number): void

      Sets the largest font size a text element may use when auto-fitting.

      Parameters

      • value: number

        The maximum font size.

      Returns void

    • get minFontSize(): number

      Gets the smallest font size a text element may use when auto-fitting.

      Returns number

      The minimum font size.

    • set minFontSize(value: number): void

      Sets the smallest font size a text element may use when auto-fitting.

      Parameters

      • value: number

        The minimum font size.

      Returns void

    • get pixelsPerUnit(): number | null

      Gets the number of pixels per unit used when rendering a sprite.

      Returns number | null

      The pixels per unit.

    • set pixelsPerUnit(value: number | null): void

      Sets the number of pixels per unit to use when rendering a sprite (image elements only).

      Parameters

      • value: number | null

        The pixels per unit.

      Returns void

    • get useInput(): boolean

      Gets whether the element component accepts input events.

      Returns boolean

      Whether the element accepts input.

    • set useInput(value: boolean): void

      Sets whether the element component accepts input events (required for buttons and scrolling).

      Parameters

      • value: boolean

        Whether the element accepts input.

      Returns void

    Methods