A common interface for Export sub fixtures.

ExportSubFixture

interface ExportSubFixture {
    $iApi: InstanceAPI;
    id: string;
    persist: boolean;
    get $element(): App<Element>;
    get $vApp(): ComponentPublicInstance;
    get config(): any;
    added?(): void;
    extend(vueComponent: Record<string, any>, options??: ComponentOptions): any;
    getLayerFixtureConfig(layerId: string): any;
    getLayerFixtureConfigs(): {
        [layerId: string]: any;
    };
    handlePanelTeleports(panels: string[]): void;
    handlePanelWidths(panels: string[]): void;
    initialized?(): void;
    make(options?: any): Promise<Object>;
    mount(component: Component, __namedParameters?: any): {
        destroy: (() => void);
        el: any;
        vNode: any;
    };
    remove(): this;
    removed?(): void;
}

Hierarchy (view full)

Properties

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

APIScope

id: string

ID of this fixture.

FixtureInstance

persist: boolean

Indicates whether to keep the fixture when the language changes. Defaults to true. If only one config is provided for all languages, the fixture will be kept on language change, regardless of the value of the flag.

Fixture

Accessors

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

  • get $vApp(): ComponentPublicInstance
  • The instance of Vue R4MP application controlled by this InstanceAPI. This is just a shorthand for this.$iApi.$vApp.

    Returns ComponentPublicInstance

    APIScope

  • get config(): any
  • Returns the fixture config section (JSON) taken from the global config.

    Returns any

    FixtureInstance

Methods

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

    Parameters

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

    Returns any

    FixtureInstance

  • 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
  • If the panelTeleport property is provided, handle specified panelTeleport for the given fixture.

    Parameters

    • panels: string[]

      list of panel names for the calling fixture

    Returns void

  • 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

  • [Optional] Called after the core map logic has executed. If the fixture is added after the map initialization, this is called immediately.

    At this point, any custom content (panels, on-map components, etc.) can be added to R4MP. Custom content can also be added throughout the life of the [module].

    Returns void

    Fixture

  • Creates an export image and returns it.

    Parameters

    • Optionaloptions: any

      fixture config options or any other options that a sub fixture accepts

    Returns Promise<Object>

    ExportSubFixture

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

    Parameters

    • component: Component
    • __namedParameters: any = {}

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

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

    • el: any
    • vNode: any

    FixtureInstance

  • Removes the specified fixture from R4MP instance. This is a proxy to rInstance.fixture.remove(...).

    Returns this

    FixtureInstance