This commit is contained in:
George Michael Brower 2014-09-02 20:44:37 -04:00
parent 632f161c80
commit b2d990338b
11 changed files with 38 additions and 71 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
<title>dat-gui</title> <title>dat-gui</title>
<link rel="import" href="gui.html"> <script src="build/gui.js"></script>
</head> </head>
<body> <body>

View File

@ -6,7 +6,7 @@
<title>dat-gui</title> <title>dat-gui</title>
<link rel="import" href="gui.html"> <script src="build/gui.js"></script>
<link rel="stylesheet" href="docs/style.css"> <link rel="stylesheet" href="docs/style.css">
</style> </style>

View File

@ -26,34 +26,11 @@ Polymer('controller-base', {
this.object = object; this.object = object;
this.path = path; this.path = path;
this.bind('value', new PathObserver(this.object, this.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() { valueChanged: function() {
// if ( this._observer ) {
// Path.get( this.path ).setValueFrom( this.object, this.value );
// }
this.update(); this.update();

View File

@ -13,13 +13,8 @@ Polymer( 'controller-boolean', {
toggle: function() { toggle: function() {
console.log( 'hi' );
this.value = !this.value; this.value = !this.value;
} }
}); });

View File

@ -23,7 +23,7 @@ border-radius = height;
height: height; height: height;
width: height; width: height;
border-radius: border-radius; border-radius: border-radius;
background: white; background: font-color;
transition: transform 0.15s ease; transition: transform 0.15s ease;
} }

View File

@ -9,17 +9,12 @@
#row { #row {
debug( blue ) debug( blue )
height: min-row-height; height: min-row-height;
transition: background-color 0.2s linear; transition: background-color 0.2s linear;
border-bottom: 1px solid lighter; border-bottom: 1px solid lighter;
&:hover {
// background-color: #262626;
}
} }
#controller { #controller {

View File

@ -14,39 +14,37 @@ debug( color )
panel-width = 245px panel-width = 245px
min-row-height = 30px min-row-height = 30px
font-color = #eee font-color = #ECEBE0
panel-color = #1a1a1a panel-color = #1E1E1E
number-color = #25A0D8 number-color = #25A0D8
boolean-color = #864694 boolean-color = #864694
string-color = #1EBD6E string-color = #1EBD6E
padding = 8px
ease = cubic-bezier( .25, .25, 0, 1 )
light = rgba( 255, 255, 255, 0.25 ) light = rgba( 255, 255, 255, 0.25 )
lighter = rgba( 255, 255, 255, 0.05 ) lighter = rgba( 255, 255, 255, 0.05 )
dark = rgba( 0, 0, 0, 0.1 ); dark = rgba( 0, 0, 0, 0.1 );
padding = 8px
ease = cubic-bezier( .25, .25, 0, 1 )
// common // common
panel-font( color = font-color ) panel-font( color = font-color )
font: 10px 'Lucida Grande', sans-serif; font: 11px 'Lucida Grande', sans-serif;
color: color; color: color;
if ( light( color ) ) if ( color == font-color )
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
input( color ) input( color )
panel-font( color ) panel-font( color )
height: 100%; height: 100%;
display: inline-block; display: inline-block;
background: transparent; background-color: transparent;
border: 0; border: 0;
padding: 0; padding: 0;
outline: none; outline: none;
transition: background-color 0.15s linear; transition: background-color 0.15s linear;
box-sizing: border-box; box-sizing: border-box;
&:hover, &:focus // &:hover, &:focus
background: lighter // background: lighter

View File

@ -11,7 +11,9 @@ var gulp = require( 'gulp' ),
marked = require( 'marked' ), marked = require( 'marked' ),
karma = require( 'karma' ); karma = require( 'karma' );
gulp.task( 'default', [ 'build' ], function() { gulp.task( 'default', [ 'docs', 'build' ] );
gulp.task( 'watch', [ 'default' ], function() {
karma.server.start( { karma.server.start( {
frameworks: [ 'jasmine' ], frameworks: [ 'jasmine' ],
@ -29,23 +31,23 @@ gulp.task( 'default', [ 'build' ], function() {
gulp.task( 'build', [ 'vulcanize' ], function() { gulp.task( 'build', [ 'vulcanize' ], function() {
return gulp.src( 'build/gui.html' ) return gulp.src( 'build/gui.html' )
.pipe( replace( /\\/g, "\\\\" ) ) .pipe( replace( /\\/g, "\\\\" ) )
.pipe( replace( /'/g, "\\'" ) ) .pipe( replace( /'/g, "\\'" ) )
.pipe( replace( /^(.*)$/gm, "'$1'," ) ) .pipe( replace( /^(.*)$/gm, "'$1'," ) )
.pipe( insert.wrap( 'document.write([', '].join("\\n"))' ) ) .pipe( insert.wrap( 'document.write([', '].join("\\n"))' ) )
.pipe( rename( 'gui.js' ) ) .pipe( rename( 'gui.js' ) )
.pipe( gulp.dest( 'build' ) ); .pipe( gulp.dest( 'build' ) );
} ); } );
gulp.task( 'vulcanize', [ 'css' ], function() { gulp.task( 'vulcanize', [ 'css' ], function() {
return gulp.src( 'gui.html' ) return gulp.src( 'gui.html' )
.pipe( vulcan( { .pipe( vulcan( {
dest: 'build', dest: 'build',
inline: true, inline: true,
strip: true strip: true
} ) ); } ) );
} ); } );
@ -63,7 +65,7 @@ gulp.task( 'docs', function() {
readme: marked( fs.readFileSync( 'README.md', 'utf8' ) ) readme: marked( fs.readFileSync( 'README.md', 'utf8' ) )
}; };
gulp.src( 'docs/template.html' ) return gulp.src( 'docs/template.html' )
.pipe( plates( content ) ) .pipe( plates( content ) )
.pipe( rename( 'index.html' ) ) .pipe( rename( 'index.html' ) )
.pipe( gulp.dest( './' ) ); .pipe( gulp.dest( './' ) );
@ -80,7 +82,7 @@ gulp.task( 'clean', function() {
function css( src, dest ) { function css( src, dest ) {
return gulp.src( src ) return gulp.src( src )
.pipe( stylus( { use: [ nib() ] } ) ) .pipe( stylus( { use: [ nib() ] } ) )
.pipe( gulp.dest( dest ) ); .pipe( gulp.dest( dest ) );
} }

View File

@ -6,7 +6,7 @@
<title>dat-gui</title> <title>dat-gui</title>
<link rel="import" href="gui.html"> <script src="build/gui.js"></script>
<link rel="stylesheet" href="docs/style.css"> <link rel="stylesheet" href="docs/style.css">
</style> </style>