@flourish/url-state

1.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @flourish/url-state

Weekly Downloads

0

Version

1.0.3

License

LicenseRef-LICENSE

Unpacked Size

10.7 kB

Total Files

9

Last publish

Collaborators

  • jontyt
  • rushlet
  • winna_canva
  • bruno-riddy
  • libruca
  • jwitcombe
  • katietannercanva
  • b3n-canva
  • caletilford
  • florin.oprina
  • robinhouston
  • duncanclark
  • daanlouter
  • hughsk
  • mark-kiln
  • animateddata
  • larsvers
  • luptilu
  • bobbysebolao
  • hrobertson
  • oampo