skqw icon indicating copy to clipboard operation
skqw copied to clipboard

Presets

Open michaelbromley opened this issue 9 years ago • 0 comments

Currently you can change the parameters of a visualization and those changes will persist for the duration of the app life. Next time you open it, all defaults will be used.

It would be good to be able to save a particular param configuration and give it a name, which is then persisted locally. Then, the user can not only switch between different visualizations, but can also switch between presets of a given visualization.

This could perhaps be extended to allow the vis author to include some presets, say, by including a presets.json file in the vis directory, which contains something like:

[
  {
    "name": "My Bundled Preset",
    "params": {
      "param1": 42,
      "param2": 2
    }
  },
  {
   ...
  }
]

User presets could be stored in the local JSON store in a format like this:

{
  "j49fj39fj39thtplsf93": [
    {
      "name": "My User Preset",
      "params": {
        "param1": 42,
        "param2": 2
      }
    }
  ]
}

where j49fj39fj39thtplsf93 is the hash of the vis name + stringified params object.

michaelbromley avatar Aug 19 '16 10:08 michaelbromley