waytale - v0.5.1
    Preparing search index...

    Class WaytaleSpace

    The instantiation of a Waytale space based on a space configuration.

    Since most modelling specifics are included in the WaytaleMap class, this class does not possess many runtime properties that differ from or extend the given configuration.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    config: SpaceConfig

    Configuration from which the space is built.

    url: string

    The canonical URL of the space.

    Methods

    • Unsubscribe from an event by name with a specific handler.

      Parameters

      • eventName: any

        event to unsubscribe from

      • handler: any

        callback handling the event

      Returns void

    • Subscribe to an event by name with a specific handler.

      Parameters

      • eventName: any

        event to subscribe to

      • handler: any

        callback handling the event

      Returns void

    • Subscribe to an event, but run the handler only once. After running exactly once the handler will be immediately unsubscribed.

      Parameters

      • eventName: any

        event to subscribe to

      • handler: any

        callback handling the event

      Returns void

    • Trigger the calls of the event handlers subscribed to the given event.

      Parameters

      • eventName: any

        event to trigger

      • ...args: any[]

        arguments to forward to the event handlers

      Returns void

    • Change the value of a property and trigger an event of the same name. A second event is triggered where the event name is the name of the property suffixed by the name of the operation.

      The event handlers will be called with the parameters of (in this order) the new value, the old value, and a reference to this.

      The method parameter specifies how the value is updated depending on whether the property is a normal value, an array, or an object. The respective value in parentheses is used as the suffix for the second trigger call.

      • assign for normal assignment (Assign)
      • prepend, append, and remove for arrays (Add, Add, Remove)
      • insert, replace, and delete for objects and maps (Insert, Replace, Delete)

      For operations on objects, the extra parameter is used as "key" i.e. property name.

      Parameters

      • key: any

        the name of the property

      • value: any

        the new value

      • method: string = 'assign'

        how to update, see description

      • extra: any = undefined

        key to use for object operations

      Returns void