add sunlight colors to color picker and tests

This commit is contained in:
Keegan
2016-02-12 16:38:06 -08:00
parent ba74959919
commit 5ad2834cc8
9 changed files with 267 additions and 27 deletions
+16
View File
@@ -47,5 +47,21 @@ module.exports = {
},
disable: disable,
enable: enable
},
color: {
get: function() {
return parseInt(this.$manipulatorTarget.get('value'), 16);
},
set: function(value) {
switch (typeof value) {
case 'number': value = value.toString(16); break;
case 'string': value = value.replace(/^#|^0x/, ''); break;
}
this.$manipulatorTarget.set('value', value || '000000');
return this.trigger('change');
},
disable: disable,
enable: enable
}
};