Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presets #8

Open
michaelbromley opened this issue Aug 19, 2016 · 0 comments
Open

Presets #8

michaelbromley opened this issue Aug 19, 2016 · 0 comments

Comments

@michaelbromley
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant