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

    Class ScrollViewComponentElement

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

    Hierarchy (View Summary)

    Index

    Accessors

    • get component(): ScrollViewComponent | null

      Gets the underlying PlayCanvas scroll view component.

      Returns ScrollViewComponent | null

      The scroll view component.

    • get content(): string

      Gets the reference to the <pc-entity> used as the content.

      Returns string

      The content entity reference.

    • set content(value: string): void

      Sets the reference (CSS selector, element id or entity name) to the <pc-entity> used as the content, which is moved as the scroll view is scrolled.

      Parameters

      • value: string

        The content entity reference.

      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 horizontalScrollbar(): string

      Gets the reference to the <pc-entity> containing the horizontal scrollbar.

      Returns string

      The horizontal scrollbar entity reference.

    • set horizontalScrollbar(value: string): void

      Sets the reference (CSS selector, element id or entity name) to the <pc-entity> containing the horizontal <pc-scrollbar>.

      Parameters

      • value: string

        The horizontal scrollbar entity reference.

      Returns void

    • get horizontalScrollbarVisibility(): number

      Gets the visibility of the horizontal scrollbar.

      Returns number

      The horizontal scrollbar visibility.

    • set horizontalScrollbarVisibility(value: number): void

      Sets the visibility of the horizontal scrollbar. Can be always (0) or when-required (1).

      Parameters

      • value: number

        The horizontal scrollbar visibility.

      Returns void

    • get scrollMode(): number

      Gets how the scroll view behaves when the content is scrolled beyond its bounds.

      Returns number

      The scroll mode.

    • set scrollMode(value: number): void

      Sets how the scroll view should behave when the content is scrolled beyond its bounds. Can be clamp (0), bounce (1) or infinite (2).

      Parameters

      • value: number

        The scroll mode.

      Returns void

    • get verticalScrollbar(): string

      Gets the reference to the <pc-entity> containing the vertical scrollbar.

      Returns string

      The vertical scrollbar entity reference.

    • set verticalScrollbar(value: string): void

      Sets the reference (CSS selector, element id or entity name) to the <pc-entity> containing the vertical <pc-scrollbar>.

      Parameters

      • value: string

        The vertical scrollbar entity reference.

      Returns void

    • get verticalScrollbarVisibility(): number

      Gets the visibility of the vertical scrollbar.

      Returns number

      The vertical scrollbar visibility.

    • set verticalScrollbarVisibility(value: number): void

      Sets the visibility of the vertical scrollbar. Can be always (0) or when-required (1).

      Parameters

      • value: number

        The vertical scrollbar visibility.

      Returns void

    • get viewport(): string

      Gets the reference to the <pc-entity> used as the viewport.

      Returns string

      The viewport entity reference.

    • set viewport(value: string): void

      Sets the reference (CSS selector, element id or entity name) to the <pc-entity> used as the viewport, which clips the content to the scroll view's bounds.

      Parameters

      • value: string

        The viewport entity reference.

      Returns void

    Methods