diff --git a/TODO.md b/TODO.md index a1031f0..0bc22bc 100644 --- a/TODO.md +++ b/TODO.md @@ -6,7 +6,7 @@ BUILD REFACTOR - [ ] controller-* => gui-* -- [ ] gui.define* => gui.var* +- [x] gui.define* => gui.var* - [ ] Gui.js => gui-panel => dat-gui PARITY @@ -30,7 +30,6 @@ DOCS - [ ] Auto generatated polymer docs STYLE - - [x] touch styles: bigger please! - [x] kill hover behavior if touch - [x] sharing more styles diff --git a/elements/Gui.js b/elements/Gui.js index 03f4461..7580f07 100644 --- a/elements/Gui.js +++ b/elements/Gui.js @@ -13,7 +13,7 @@ // Properties - this.defined = {}; + this.vars = {}; this.localStorage = params.localStorage || false; // Make domElement @@ -84,22 +84,22 @@ }; - Gui.prototype.define = function() { + Gui.prototype.var = function() { var name, initialValue, args; if ( arguments.length == 1 ) { name = arguments[ 0 ]; - return this.defined[ name ]; + return this.vars[ name ]; } initialValue = arguments[ 1 ]; name = arguments[ 0 ]; - args = [ this.defined, name ]; + args = [ this.vars, name ]; args = args.concat( Array.prototype.slice.call( arguments, 2 ) ); - this.defined[ name ] = initialValue; + this.vars[ name ] = initialValue; return this.add.apply( this, args ); diff --git a/elements/shim.js b/elements/shim.js index d03f2bd..b55c748 100644 --- a/elements/shim.js +++ b/elements/shim.js @@ -2,10 +2,10 @@ ( function( scope ) { 'use strict'; - + var Gui = function() { - this.defined = {}; + this.vars = {}; }; @@ -15,15 +15,15 @@ }; - Gui.prototype.define = function( name, value ) { + Gui.prototype.var = function( name, value ) { - this.defined[ name ] = value; + this.vars[ name ] = value; return controllerShim; }; Gui.prototype.add = function( object, path ) { - + return controllerShim; }; @@ -36,4 +36,4 @@ scope.Gui = Gui; -} )( this ); \ No newline at end of file +} )( this ); diff --git a/examples/index.html b/examples/index.html index bf634d3..2b9c45c 100644 --- a/examples/index.html +++ b/examples/index.html @@ -4,13 +4,13 @@