This commit is contained in:
George Michael Brower 2014-09-16 12:03:30 -04:00
parent bc0cb2bdb9
commit b38b85b12a
4 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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 );