dat.gui/elements/controller-boolean/controller-boolean.js
2014-08-26 17:01:15 -07:00

31 lines
406 B
JavaScript

Gui.register( 'controller-boolean', function( value ) {
return typeof value == 'boolean';
} );
Polymer( 'controller-boolean', {
ready: function() {
},
change: function() {
this.value = this.$.input.checked;
},
update: function() {
// should i really have to do this?
this.$.input.checked = this.value;
}
});