add radio component

This commit is contained in:
Keegan
2016-02-14 02:31:46 -08:00
parent f00b288a82
commit 71dd8ef1c3
12 changed files with 186 additions and 31 deletions
+13
View File
@@ -48,6 +48,19 @@ module.exports = {
disable: disable,
enable: enable
},
radio: {
get: function() {
return this.$element.select('input:checked').get('value');
},
set: function(value) {
this.$element
.select('input[value="' + value.replace('"', '\\"') + '"]')
.set('checked', true);
return this.trigger('change');
},
disable: disable,
enable: enable
},
color: {
get: function() {
return parseInt(this.$manipulatorTarget.get('value'), 16);