A base class for Fixture subclasses. It provides some utility functions to Fixtures and also gives access to $iApi and $vApp globals.

Export

Implements

Hierarchy

Constructors

Properties

The instance of RampMap API scoped to a single Vue R4MP application.

Memberof

APIScope

id: string

ID of this fixture.

Memberof

FixtureInstance

Accessors

  • get $element(): App<Element>
  • Returns App<Element>

  • get $vApp(): ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>
  • The instance of Vue R4MP application controlled by this InstanceAPI. This is just a shorthand for this.$iApi.$vApp.

    Memberof

    APIScope

    Returns ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>

  • get config(): undefined | LegendConfig
  • Returns LegendConfig section of the global config file.

    Memberof

    LegendAPI

    Returns undefined | LegendConfig

Methods

  • Deletes the given legend item from the legend store

    Parameters

    • item: LegendItem

      the legend item to be deleted

    Returns boolean

    returns true if item was removed, false otherwise

  • Add the given legend item to the legend store

    Parameters

    • item: LegendItem

      the legend item to be added

    • Optional parent: LegendItem

      the parent legend item for this item

    Returns void

  • Parses the legend config JSON snippet from the config file and save resulting objects to the fixture store.

    Parameters

    • Optional legendConfig: LegendConfig

    Returns void

  • Search for first legend item that satisfies the predicate, starting from the given root item.

    Parameters

    • root: LegendItem

      the root item to start searching from

    • predicate: ((item) => boolean)

      boolean predicate to test each item

        • (item): boolean
        • Parameters

          • item: LegendItem

          Returns boolean

    Returns undefined | LegendItem

    return the first item that satisfies the given predicate. returns undefined if item is not found.

  • Search for all legend items that satisfy the predicate, starting from the given root item.

    Parameters

    • root: LegendItem

      the root item to start searching from

    • predicate: ((item) => boolean)

      predicate boolean predicate to test each item

        • (item): boolean
        • Parameters

          • item: LegendItem

          Returns boolean

    Returns LegendItem[]

    return the first item that satisfies the given predicate. returns undefined if item is not found.

  • Toggles visibility for all items or expands/collapses all groups.

    Parameters

    • item: LegendItem

      current legend item that is being checked

    • options: any

      specifies whether visibility or expand/collapse functionality is to be changed

    Returns void

  • Add a legend item given the legend config, or legend item instance

    Memberof

    LegendAPI

    Parameters

    • item: any

      the config for the legend item or a legend item instance

    • Optional parent: LegendItem

      optional parent item to create this item under

    Returns LegendItem

    the added legend item

  • Add a layer legend item given a layer instance

    Memberof

    LegendAPI

    Parameters

    • layer: LayerInstance

      the layer to create an item for

    • Optional parent: LegendItem

      optional parent item to create this item under

    Returns Promise<LayerItem>

    a promise that resolves with the added layer item

  • Construct a legend item given the legend config

    Memberof

    LegendAPI

    Parameters

    • itemConf: any

      legend item config

    • Optional parent: LegendItem

      the parent legend item for the created item

    Returns LegendItem

    returns the constructed legend item

  • Set the expanded state of legend items to expanded

    Memberof

    LegendAPI

    Parameters

    • expanded: boolean

      the expanded state the items will be set to

    • Optional root: LegendItem

      the root item to start updating the expanded state from

    Returns void

  • A helper function to create a "subclass" of the base Vue constructor

    Memberof

    FixtureInstance

    Parameters

    • vueComponent: Record<string, any>
    • Optional options: ComponentOptions<{}, any, any, any, any, any, any, any, any> = {}

    Returns any

  • Get all legend items with the given expanded state. Not specifying the expanded state will return all items with expanded set to true

    Memberof

    LegendAPI

    Parameters

    • Optional expanded: boolean

      the expanded state to check for

    Returns LegendItem[]

    the items with the given expanded state

  • Get all legend items with the given visibility state. Not specifying the visibility state will return all items with visibility set to true

    Memberof

    LegendAPI

    Parameters

    • Optional visibility: boolean

      the visibility state to check for

    Returns LegendItem[]

    the items with the given expanded state

  • Get a legend item given its uid.

    Memberof

    LegendAPI

    Parameters

    • uid: string

      the uid of the legend item

    Returns undefined | LegendItem

    return legend item with given uid. returns undefined if item is not found.

  • Get this fixture's config from the layer config with the given layer id Will return undefined if layer config did not specify a config for this fixture

    Parameters

    • layerId: string

      The layer's id

    Returns any

    This fixture's config for the given layer

  • Combines this fixtures configs from layer configs into an indexed-dictionary

    Returns {
        [layerId: string]: any;
    }

    Dictionary where key is the layer id and the value is this fixture's config for that layer

    • [layerId: string]: any
  • Get a layer item connected to the layer with the given id/uid or the given layer instance.

    Memberof

    LegendAPI

    Parameters

    • layer: string | LayerInstance

      the id/uid of the layer or layer instance

    Returns undefined | LayerItem

    return layer item tied to the found layer. returns undefined if no such item is found.

  • Returns the full legend tree. Note: This returns a direct reference to the legend tree. Mutations will persist.

    Memberof

    LegendAPI

    Returns LegendItem[]

    returns the full legend tree

  • Maps the current legend tree into a legend config snippet.

    In addition to legend config schema properties, this snippet will also include properties such as the item type, item's uid, layer uid etc.

    Memberof

    LegendAPI

    Returns any

    returns the legend config

  • If the panelWidth property is provided, handle default and specified panel widths for the given fixture.

    Parameters

    • panels: string[]

      list of panel names for the calling fixture

    Returns void

  • Helper with programatically creating a component in Vue 3 (replaces the deprecated Vue.extend)

    Memberof

    FixtureInstance

    Parameters

    • component: Component<any, any, any, ComputedOptions, MethodOptions>
    • __namedParameters: any = {}

    Returns {
        destroy: (() => void);
        el: any;
        vNode: any;
    }

    • destroy: (() => void)
        • (): void
        • Returns void

    • el: any
    • vNode: any
  • Reload the legend item connected to the layer with the given layer id/uid

    Memberof

    LegendAPI

    Parameters

    • layerId: string

      the id or uid of the reloaded layer

    Returns boolean

    returns true if item was successfully reloaded, false otherwise

  • Removes the legend item with the given uid, or the item instance.

    Memberof

    LegendAPI

    Parameters

    • item: string | LegendItem

      the uid of item or legend item instance to be removed

    Returns boolean

    returns true if item was removed, false otherwise

  • Remove the layer item connected to the layer with the given id/uid or the given layer instance.

    Memberof

    LegendAPI

    Parameters

    • layer: string | LayerInstance

      the id/uid of the layer or layer instance

    Returns boolean

    returns true if item was removed, false otherwise

  • Set the visibility state of legend items to visibility

    Memberof

    LegendAPI

    Parameters

    • visibility: boolean

      the visibility state the items will be set to

    • Optional root: LegendItem

      the root item to start updating the visibility state from

    Returns void

  • Update an existing layer item with data from the given layer Does nothing if the layer item is not found

    Memberof

    LegendAPI

    Parameters

    Returns void

  • Adds missing functions and properties to the object implementing FixtureBase interface. This is only needed for external fixtures as they can't inherit from FixtureInstance.

    TODO: If you know a better way to deep-mixin props/getters/functions from a class into another class instance, please tell me. I honestly don't know 🤷‍♂️.

    Static

    Memberof

    FixtureInstance

    Parameters

    Returns FixtureInstance

Generated using TypeDoc