@hydroperx/metro
    Preparing search index...

    Class TilesController

    Provides control over tiles in a Tiles container.

    Hierarchy

    Index

    Constructors

    • Returns TilesController

    Methods

    • Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.

      The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.

      When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.

      When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.

      When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.

      If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.

      The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.

      MDN Reference

      Type Parameters

      Parameters

      • type: K
      • callback: (
            event: TilesEventMap[K] extends Event ? any[any] : never,
        ) => TilesEventMap[K] extends Event ? void : never
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.

      The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.

      When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.

      When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.

      When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.

      If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.

      The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.

      MDN Reference

      Parameters

      • type: string
      • callback: null | EventListenerOrEventListenerObject
      • Optionaloptions: boolean | EventListenerOptions

      Returns void

    • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • Returns the number of inline groups available for the given width (either in px or em). Applies to vertical layouts only.

      Parameters

      • width: string

      Returns Promise<number>

    • Shorthand to removeEventListener().

      Type Parameters

      Parameters

      • type: K
      • listenerFn: (event: TilesEventMap[K]) => void
      • Optionaloptions: EventListenerOptions

      Returns void

    • Shorthand to removeEventListener().

      Parameters

      • type: string
      • listenerFn: (event: Event) => void
      • Optionaloptions: EventListenerOptions

      Returns void

    • Shorthand to addEventListener().

      Type Parameters

      Parameters

      • type: K
      • listenerFn: (event: TilesEventMap[K]) => void
      • Optionaloptions: AddEventListenerOptions

      Returns void

    • Shorthand to addEventListener().

      Parameters

      • type: string
      • listenerFn: (event: Event) => void
      • Optionaloptions: AddEventListenerOptions

      Returns void

    • Removes the event listener in target's event listener list with the same type, callback, and options.

      MDN Reference

      Type Parameters

      Parameters

      • type: K
      • callback: (
            event: TilesEventMap[K] extends Event ? any[any] : never,
        ) => TilesEventMap[K] extends Event ? void : never
      • Optionaloptions: boolean | EventListenerOptions

      Returns void

    • Removes the event listener in target's event listener list with the same type, callback, and options.

      MDN Reference

      Parameters

      • type: string
      • callback: null | EventListenerOrEventListenerObject
      • Optionaloptions: boolean | EventListenerOptions

      Returns void

    • Sets the label text of a group.

      Parameters

      • id: string
      • value: string

      Returns void

    • Sets whether a tile is checked or not.

      Parameters

      • id: string
      • value: boolean

      Returns void

    • Sets the color of a tile.

      Parameters

      • id: string
      • value: undefined | string

      Returns void

    • Sets the label color of a tile.

      Parameters

      • id: string
      • value: undefined | string

      Returns void

    • Sets the pages of a tile (icon, label and live tile pages).

      Parameters

      • id: string
      • __namedParameters: {
            icon?: string;
            iconSize?: TileIconSize;
            label?: string;
            livePages?: LiveTilePage[];
            style?: TileStyle;
        }

      Returns void

    • Gets the button element corresponding to a tile.

      Parameters

      • tile: string

      Returns Promise<null | HTMLButtonElement>