1.0.3 • Published 3 months ago

@flourish/url-state v1.0.3

Weekly downloads
-
License
LicenseRef-LICENS...
Repository
-
Last release
3 months ago

Flourish url state

How to install

npm install -s @flourish/url-state

Add to the state with:

  url_state: {}

Add the settings to the bottom of the settings in the template.yml with:

  - URL settings
  - property: url_state
    import: "@flourish/url-state"

Usage

Import it & initialise, typically at the top of the draw function, passing in the module state, the template's state and the callback. For example:

import initURLState from "@flourish/url-state";

// ...

function draw() {
 initURLState(state.url_state, state, update);

 // ...

URL state won't be accessible until it has been enabled in the theme using: url_state.enabled: true. One this is enabled, the user can add state to the visualization's URL as URL-encoded JSON.

More information

How URL state settings work Using URL state settings

1.0.3

3 months ago

1.0.2

1 year ago

1.0.1

3 years ago

1.0.0

3 years ago