diff --git a/build/gui.html b/build/gui.html index 49b89bf..8fa7183 100644 --- a/build/gui.html +++ b/build/gui.html @@ -10,11 +10,11 @@ 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}})}(); - - - + + + \ No newline at end of file diff --git a/build/gui.js b/build/gui.js index d05a843..cc314cd 100644 --- a/build/gui.js +++ b/build/gui.js @@ -10,11 +10,11 @@ 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}})}();', '', '', '', -'', -'', -'', +'', +'', +'', '',].join("\n")) \ No newline at end of file diff --git a/demo.html b/demo.html index 38125ad..cc59f5a 100644 --- a/demo.html +++ b/demo.html @@ -6,7 +6,7 @@ dat-gui - + diff --git a/docs/template.html b/docs/template.html index 58d3ed8..586d39b 100644 --- a/docs/template.html +++ b/docs/template.html @@ -6,7 +6,7 @@ dat-gui - + diff --git a/elements/controller-base/controller-base.js b/elements/controller-base/controller-base.js index bb8da26..92405ce 100644 --- a/elements/controller-base/controller-base.js +++ b/elements/controller-base/controller-base.js @@ -26,34 +26,11 @@ Polymer('controller-base', { this.object = object; this.path = path; - this.bind('value', new PathObserver(this.object, this.path)); - // if ( this._observer ) { - // this._observer.close(); - // delete this._observer; - // } - - // var _this = this; - - // this._observer = new PathObserver( this.object, this.path ); - // this._observer.open( function( newValue ) { - - // _this.value = newValue; - - // } ); - - // this.value = this.object[ this.path ]; - }, valueChanged: function() { - - // if ( this._observer ) { - - // Path.get( this.path ).setValueFrom( this.object, this.value ); - - // } this.update(); diff --git a/elements/controller-boolean/controller-boolean.js b/elements/controller-boolean/controller-boolean.js index 1f053f6..efa820e 100644 --- a/elements/controller-boolean/controller-boolean.js +++ b/elements/controller-boolean/controller-boolean.js @@ -13,13 +13,8 @@ Polymer( 'controller-boolean', { toggle: function() { - console.log( 'hi' ); this.value = !this.value; } - - - - }); diff --git a/elements/controller-boolean/controller-boolean.styl b/elements/controller-boolean/controller-boolean.styl index fd8f1b7..6d7a6b5 100644 --- a/elements/controller-boolean/controller-boolean.styl +++ b/elements/controller-boolean/controller-boolean.styl @@ -23,7 +23,7 @@ border-radius = height; height: height; width: height; border-radius: border-radius; - background: white; + background: font-color; transition: transform 0.15s ease; } diff --git a/elements/gui-row/gui-row.styl b/elements/gui-row/gui-row.styl index abbd3a0..3838cc0 100644 --- a/elements/gui-row/gui-row.styl +++ b/elements/gui-row/gui-row.styl @@ -9,17 +9,12 @@ #row { - debug( blue ) height: min-row-height; transition: background-color 0.2s linear; border-bottom: 1px solid lighter; - &:hover { - // background-color: #262626; - } - } #controller { diff --git a/elements/shared.styl b/elements/shared.styl index 93e1882..7b78666 100644 --- a/elements/shared.styl +++ b/elements/shared.styl @@ -14,39 +14,37 @@ debug( color ) panel-width = 245px min-row-height = 30px -font-color = #eee -panel-color = #1a1a1a +font-color = #ECEBE0 +panel-color = #1E1E1E number-color = #25A0D8 boolean-color = #864694 string-color = #1EBD6E -padding = 8px - -ease = cubic-bezier( .25, .25, 0, 1 ) - light = rgba( 255, 255, 255, 0.25 ) lighter = rgba( 255, 255, 255, 0.05 ) dark = rgba( 0, 0, 0, 0.1 ); +padding = 8px +ease = cubic-bezier( .25, .25, 0, 1 ) // common panel-font( color = font-color ) - font: 10px 'Lucida Grande', sans-serif; + font: 11px 'Lucida Grande', sans-serif; color: color; - if ( light( color ) ) + if ( color == font-color ) -webkit-font-smoothing: antialiased; input( color ) panel-font( color ) height: 100%; display: inline-block; - background: transparent; + background-color: transparent; border: 0; padding: 0; outline: none; transition: background-color 0.15s linear; box-sizing: border-box; - &:hover, &:focus - background: lighter \ No newline at end of file + // &:hover, &:focus + // background: lighter \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 14ebb4a..7f89493 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -11,7 +11,9 @@ var gulp = require( 'gulp' ), marked = require( 'marked' ), karma = require( 'karma' ); -gulp.task( 'default', [ 'build' ], function() { +gulp.task( 'default', [ 'docs', 'build' ] ); + +gulp.task( 'watch', [ 'default' ], function() { karma.server.start( { frameworks: [ 'jasmine' ], @@ -29,23 +31,23 @@ gulp.task( 'default', [ 'build' ], function() { gulp.task( 'build', [ 'vulcanize' ], function() { return gulp.src( 'build/gui.html' ) - .pipe( replace( /\\/g, "\\\\" ) ) - .pipe( replace( /'/g, "\\'" ) ) - .pipe( replace( /^(.*)$/gm, "'$1'," ) ) - .pipe( insert.wrap( 'document.write([', '].join("\\n"))' ) ) - .pipe( rename( 'gui.js' ) ) - .pipe( gulp.dest( 'build' ) ); + .pipe( replace( /\\/g, "\\\\" ) ) + .pipe( replace( /'/g, "\\'" ) ) + .pipe( replace( /^(.*)$/gm, "'$1'," ) ) + .pipe( insert.wrap( 'document.write([', '].join("\\n"))' ) ) + .pipe( rename( 'gui.js' ) ) + .pipe( gulp.dest( 'build' ) ); } ); gulp.task( 'vulcanize', [ 'css' ], function() { return gulp.src( 'gui.html' ) - .pipe( vulcan( { - dest: 'build', - inline: true, - strip: true - } ) ); + .pipe( vulcan( { + dest: 'build', + inline: true, + strip: true + } ) ); } ); @@ -63,7 +65,7 @@ gulp.task( 'docs', function() { readme: marked( fs.readFileSync( 'README.md', 'utf8' ) ) }; - gulp.src( 'docs/template.html' ) + return gulp.src( 'docs/template.html' ) .pipe( plates( content ) ) .pipe( rename( 'index.html' ) ) .pipe( gulp.dest( './' ) ); @@ -80,7 +82,7 @@ gulp.task( 'clean', function() { function css( src, dest ) { return gulp.src( src ) - .pipe( stylus( { use: [ nib() ] } ) ) - .pipe( gulp.dest( dest ) ); + .pipe( stylus( { use: [ nib() ] } ) ) + .pipe( gulp.dest( dest ) ); } \ No newline at end of file diff --git a/index.html b/index.html index 26d6e01..bf13ba5 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ dat-gui - +