Options
All
  • Public
  • Public/Protected
  • All
Menu

Newly introduced in Micrio 4.0 is the replacement of the way you can interact with markers and tours from a classic imperative JavaScript API to a Svelte-inspired, store-based state management using SvelteStore.

This has greatly simplified the internal workings and has made the HTML interface fully reactive based on the image state instead of being interwoven in the previous JS API itself.

There are 2 State controllers:

  1. State.Main: the main HTMLMicrioElement.state state controller, used for:
    • Getting and setting the active tour and marker
    • Loading and saving the entire current state as a minimal independent JSON object
  2. State.Image: individual image MicrioImage.state controller, used for:
    • Setting the current opened marker in this image
    • Getting the image's last known viewport, even if it is not active at the moment

Upgrading from Micrio 3.x to 4.x

Please refer to this Micrio knowledge base article for if you want to upgrade an existing 3.x implementation to 4.x.

author

Marcel Duin marcel@micr.io

copyright

Q42 Internet BV, Micrio, 2015 - 2023

link

https://micr.io/ , https://q42.nl/en/

Index

Type aliases

Classes

Type aliases

MicrioStateJSON

MicrioStateJSON: { id: string; c: (number | string)[][]; t?: [string, number?]; m?: HTMLMediaElement }

A main Micrio state JSON object

Type declaration

  • id: string

    The current image id

  • c: (number | string)[][]

    Array of individual image states

  • Optional t?: [string, number?]

    Any running tour

  • Optional m?: HTMLMediaElement

    Any running media

Generated using TypeDoc