FIMViz.jsAPI
    Preparing search index...

    Class FimVizInstance

    A FimViz instance: the shared service container behind one or more FimMaps. The user rarely holds one directly — they work in Maps/Layers and the default is implicit.

    Index
    • get config(): any

      This app's own config object (defaults merged with whatever was passed to mount()/create()).

      Returns any

    • get datasets(): Dataset[]

      Every Dataset parsed on this app, by any of its maps. A copy — register via fim.addDataset() (or fim.addLayer(rawFile), which parses implicitly), not by pushing here.

      Returns Dataset[]

    • get emitter(): any

      The underlying event emitter backing on/off/emit.

      Returns any

    • get hasMaps(): boolean

      Does this app have at least one mounted FimMap? Used as the single-instance mount guard.

      Returns boolean

    • get isDefault(): boolean

      Is this the shared ambient default app (vs. one created via { isolated: true })?

      Returns boolean

    • get storage(): Storage

      Client-side storage — shared across this app's maps. Lazily built from config.storage, because Storage is GENERIC: the host owns the database name and schema, so the library has nothing to construct one from until it is configured (docs/DECISIONS_TRADEOFFS_INCOMPLETE_ITEMS.md §1.1).

      mount('#el', { apiKey, storage: { name: 'my-store', version: 1, tables: ['userFiles'] } })

      Not configured is a clear throw rather than a silent null: reaching for storage you never set up is a programming error.

      Returns Storage

    • Register a Dataset parsed elsewhere — typically one crossing over from another app, since a Dataset is a free value that any map can render. Idempotent; returns the Dataset for chaining.

      app2.adoptDataset(app1.datasets[0]); // now discoverable on app2 too, no re-parse

      Parameters

      Returns Dataset

    • Merge host options into config. No-op (with a warning) once locked.

      Parameters

      • Optionaloptions: any = {}

      Returns void

    • Force-teardown of every map on this app (rare; the ref-counted path is the norm).

      Returns void

    • Lock config against further changes — called once the first map on this app has booted.

      Returns void

    • Forget a Dataset: drop it from this registry and release its decode.

      The verb lives HERE, not on Layer, because the app owns the registry — a Layer cannot know whether a Layer on another map still wants it. That is also why this REFUSES while references remain: unregistering data something is still rendering is never what the caller meant.

      Parameters

      • ds: Dataset
      • Optionalopts: { force?: boolean } = {}

        force: true drops it regardless (the renderers keep their own reference and re-force on next draw; only discoverability is lost)

      Returns boolean

      false if it was not registered here