dat.gui/elements/controller-boolean/controller-boolean.js

31 lines
406 B
JavaScript
Raw Normal View History

2014-08-27 00:01:15 +00:00
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;
}
});