diff --git a/TODO.md b/TODO.md index 2fd6926..c9ee169 100644 --- a/TODO.md +++ b/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 diff --git a/build/dat-gui.html b/build/dat-gui.html index d4c36ca..1f111e6 100755 --- a/build/dat-gui.html +++ b/build/dat-gui.html @@ -6,7 +6,7 @@ var e,f,g,h=b.type;if("load"===h&&!b.bubbles){var i=c;i instanceof Q.Document&&( +},_register:function(){c(this.extends)&&!b(this.extends)&&console.warn("%s is attempting to extend %s, an unregistered element or one that was not registered with Polymer.",this.name,this.extends),this.register(this.name,this.extends),this.registered=!0},waitingForPrototype:function(a){return h(a)?void 0:(i(a,this),this.handleNoScript(a),!0)},handleNoScript:function(a){this.hasAttribute("noscript")&&!this.noscript&&(this.noscript=!0,Polymer(a))},waitingForResources:function(){return this._needsResources},waitingForQueue:function(){return f.enqueue(this,this.registerWhenReady,this._register)},loadResources:function(){this._needsResources=!0,this.loadStyles(function(){this._needsResources=!1,this.registerWhenReady()}.bind(this))}});e.publish(e.declaration,j),g(function(){document.body.removeAttribute("unresolved"),document.dispatchEvent(new CustomEvent("polymer-ready",{bubbles:!0}))}),document.registerElement("polymer-element",{prototype:j})}(Polymer),function(){var a=document.createElement("polymer-element");a.setAttribute("name","auto-binding"),a.setAttribute("extends","template"),a.init(),Polymer("auto-binding",{createdCallback:function(){this.syntax=this.bindingDelegate=this.makeSyntax(),Polymer.whenPolymerReady(function(){this.model=this,this.setAttribute("bind",""),this.async(function(){this.marshalNodeReferences(this.parentNode),this.fire("template-bound")})}.bind(this))},makeSyntax:function(){var a=Object.create(Polymer.api.declaration.events),b=this;a.findController=function(){return b.model};var c=new PolymerExpressions,d=c.prepareBinding;return c.prepareBinding=function(b,e,f){return a.prepareEventBinding(b,e,f)||d.call(c,b,e,f)},c}})}(); diff --git a/build/dat-gui.js b/build/dat-gui.js index e6e095e..34ae393 100755 --- a/build/dat-gui.js +++ b/build/dat-gui.js @@ -6,7 +6,7 @@ document.write(['', +'},_register:function(){c(this.extends)&&!b(this.extends)&&console.warn("%s is attempting to extend %s, an unregistered element or one that was not registered with Polymer.",this.name,this.extends),this.register(this.name,this.extends),this.registered=!0},waitingForPrototype:function(a){return h(a)?void 0:(i(a,this),this.handleNoScript(a),!0)},handleNoScript:function(a){this.hasAttribute("noscript")&&!this.noscript&&(this.noscript=!0,Polymer(a))},waitingForResources:function(){return this._needsResources},waitingForQueue:function(){return f.enqueue(this,this.registerWhenReady,this._register)},loadResources:function(){this._needsResources=!0,this.loadStyles(function(){this._needsResources=!1,this.registerWhenReady()}.bind(this))}});e.publish(e.declaration,j),g(function(){document.body.removeAttribute("unresolved"),document.dispatchEvent(new CustomEvent("polymer-ready",{bubbles:!0}))}),document.registerElement("polymer-element",{prototype:j})}(Polymer),function(){var a=document.createElement("polymer-element");a.setAttribute("name","auto-binding"),a.setAttribute("extends","template"),a.init(),Polymer("auto-binding",{createdCallback:function(){this.syntax=this.bindingDelegate=this.makeSyntax(),Polymer.whenPolymerReady(function(){this.model=this,this.setAttribute("bind",""),this.async(function(){this.marshalNodeReferences(this.parentNode),this.fire("template-bound")})}.bind(this))},makeSyntax:function(){var a=Object.create(Polymer.api.declaration.events),b=this;a.findController=function(){return b.model};var c=new PolymerExpressions,d=c.prepareBinding;return c.prepareBinding=function(b,e,f){return a.prepareEventBinding(b,e,f)||d.call(c,b,e,f)},c}})}();', '', '', '', diff --git a/elements/dat-gui/static.js b/elements/dat-gui/static.js index df05192..a4eed19 100644 --- a/elements/dat-gui/static.js +++ b/elements/dat-gui/static.js @@ -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 );