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