scrapjs / prama

[Replaced with settings-panel] Panel manager for applications, demos or tests.
https://dfcreative.github.io/prama
5 stars 0 forks source link

State control #7

Closed dy closed 8 years ago

dy commented 8 years ago

As suggested by @rreusser https://github.com/freeman-lab/control-panel/pull/13#issuecomment-231604545, state control may be of use:

panel.next();
panel.prev();
panel.save('name');
panel.load('name');

That seems to be the case of dat.gui btw.

rreusser commented 8 years ago

Interesting. I'm realizing that I effectively suggested a full undo-redo feature, which seems (IMO) a bit heavy. prama.on('change', …); together with .get and .set is probably all you need to fairy easily add undo/redo yourself. The pain point for me with control-panel is that events give you the whole state and I never got around to adding field names to the event or just diffing it and isolating the changes. So if I were to use prama I'd be 100% satisfied with prama.on('change', (name, value, opts) => {}); as you've defined it. 👍

dy commented 8 years ago

Done)