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

23 lines
264 B
JavaScript
Raw Normal View History

2014-09-04 04:14:36 +00:00
/* globals Gui, Polymer */
'use strict';
Gui.register('controller-boolean', function(value) {
2014-08-27 00:01:15 +00:00
return typeof value == 'boolean';
});
Polymer('controller-boolean', {
ready: function() {
2014-08-27 00:01:15 +00:00
},
2014-08-27 00:01:15 +00:00
toggle: function() {
2014-08-27 00:01:15 +00:00
this.value = !this.value;
2014-08-27 00:01:15 +00:00
}
2014-08-27 00:01:15 +00:00
});