mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
remember
This commit is contained in:
parent
bc0cb2bdb9
commit
b38b85b12a
9
TODO.md
9
TODO.md
@ -6,17 +6,18 @@ PARITY
|
||||
|
||||
- [ ] remember
|
||||
|
||||
- [ ] remember option controller
|
||||
- [ ] save server !!
|
||||
- [ ] acknowledges save
|
||||
- [ ] dat-gui server npm install -g ?
|
||||
- [ ] remember gui.vars
|
||||
- [ ] debounce save
|
||||
- [ ] presets
|
||||
- [x] remember option controller
|
||||
- [x] debounce save
|
||||
|
||||
|
||||
NEW FEATURES
|
||||
|
||||
- [ ] dividers
|
||||
- [ ] save server !!
|
||||
- [ ] acknowledges save
|
||||
|
||||
- [ ] * disable * listen
|
||||
- [ ] override gui.var initialValues with url.js
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -28,16 +28,15 @@ Gui.constructor = function( params ) {
|
||||
|
||||
this.localStorage = scope.localStorage && ( params.localStorage || false );
|
||||
|
||||
this.autoSave = params.autoSave || this.localStorage;
|
||||
this.savePath = params.savePath || Gui.DEFAULT_SAVE_PATH;
|
||||
|
||||
if ( this.autoSave ) {
|
||||
if ( params.save ) {
|
||||
|
||||
this.addEventListener( 'change', Gui.debounce( this.save, this, 50 ) );
|
||||
|
||||
}
|
||||
|
||||
if ( params.autoSave && !this.localStorage ) {
|
||||
if ( params.save && !this.localStorage ) {
|
||||
|
||||
Gui.getJSON( this.savePath, this.unserialize, this );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user