Options
All
  • Public
  • Public/Protected
  • All
Menu

Composes a chain of controllers.

This controller allows you to chain multiple controllers together, one after the other. Events are forwarded down the chain, until the first controller handles the event.

Use appendController to add controllers to the chain.

See the Managing user input with LuciadRIA controllers tutorial for more information.

since

2022.1

Hierarchy

Implements

Overview

Constructors

constructor

Events

on

  • (event: "Activated", callback: (map: Map) => void, context?: any): Handle
  • (event: "Deactivated", callback: (map: Map) => void, context?: any): Handle
  • (event: "Invalidated", callback: () => void, context?: any): Handle
  • An event indicating that this Controller has been activated. Activated means that the controller is active on the map, and the controller's onActivate has been called.

    You can use this event to set up UI elements or other listeners related to the controller and the controller's map.

    since

    2021.0

    Parameters

    • event: "Activated"
    • callback: (map: Map) => void
        • (map: Map): void
        • Parameters

          Returns void

    • Optional context: any

    Returns Handle

  • An event indicating that this Controller has been deactivated. Deactivated means that the controller has been removed from the map, and the controller's onDeactivate has been called.

    You can use this event to clean up UI elements or other listeners related to the controller and the controller's map.

    since

    2021.0

    Parameters

    • event: "Deactivated"
    • callback: (map: Map) => void
        • (map: Map): void
        • Parameters

          Returns void

    • Optional context: any

    Returns Handle

  • An event indicating that this Controller is invalidated. Invalidated means that the Controller requests for its onDraw to be called during the next rendering pass (because its appearance has changed). This event fires when invalidate is called.

    Parameters

    • event: "Invalidated"
    • callback: () => void
        • (): void
        • Returns void

    • Optional context: any

    Returns Handle

Accessors

Protected cursor

  • get cursor(): string | null
  • set cursor(cssCursor: string | null): void
  • The CSS cursor to use on the map, for this controller. If null, the map will fall back to the previous cursor that was set on the map.

    Note that changing this cursor will update the cursor on the map's DOM node. When using multiple controllers (e.g. in a CompositeController), the controller that updates the cursor last (to a non-null value), will override any other non-null cursors of active controllers on the map.

    see

    Map.cursorManager

    since

    2022.1

    Returns string | null

  • The CSS cursor to use on the map, for this controller. If null, the map will fall back to the previous cursor that was set on the map.

    Note that changing this cursor will update the cursor on the map's DOM node. When using multiple controllers (e.g. in a CompositeController), the controller that updates the cursor last (to a non-null value), will override any other non-null cursors of active controllers on the map.

    see

    Map.cursorManager

    since

    2022.1

    Parameters

    • cssCursor: string | null

    Returns any

delegates

map

  • get map(): Map | null
  • set map(_value: Map | null): void
  • The map on which this controller is currently active or null if this controller is not currently active. This property is read-only.

    Returns Map | null

  • The map on which this controller is currently active or null if this controller is not currently active. This property is read-only.

    Parameters

    • _value: Map | null

    Returns any

Methods

appendController

  • Chains a new controller to this CompositeController. Note that you cannot append controllers while the CompositeController is active on the map.

    Parameters

    • controller: Controller

      The new controller to append to the chain of controllers

    Returns void

invalidate

  • (): void

onActivate

  • (map: Map): void
  • Called when the controller becomes active on the map. Controller.onActivate is called for every controller in the chain.

    Parameters

    • map: Map

      the map on which the controller has been activated

    Returns void

onDeactivate

  • (map: Map): Promise<any>
  • Called when the controller is removed from the map. Controller.onDeactivate is called for every controller in the chain. The returned promise resolves to an array containing the results of calling Controller.onDeactivate on the chained controllers.

    Parameters

    • map: Map

      the map on which the controller is being deactivated

    Returns Promise<any>

onDraw

onDrawLabel

onGestureEvent

onKeyEvent

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method