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

31 lines
406 B
JavaScript
Raw Normal View History

2014-08-23 07:05:22 +00:00
Gui.register( 'controller-boolean', function( value ) {
return typeof value == 'boolean';
} );
Polymer( 'controller-boolean', {
ready: function() {
},
change: function() {
this.value = this.$.input.checked;
2014-08-24 07:11:26 +00:00
},
update: function() {
// should i really have to do this?
this.$.input.checked = this.value;
2014-08-23 07:05:22 +00:00
}
2014-08-24 07:11:26 +00:00
2014-08-23 07:05:22 +00:00
});