mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
31 lines
406 B
JavaScript
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|