Added Slider component

This commit is contained in:
Keegan
2016-03-10 04:20:50 +11:00
parent 0faa585d5f
commit 0873f5eba2
9 changed files with 307 additions and 1 deletions
+15
View File
@@ -85,6 +85,21 @@ module.exports = {
hide: hide,
show: show
},
slider: {
get: function() {
return parseFloat(this.$manipulatorTarget.get('value'));
},
set: function(value) {
var initVal = this.get();
this.$manipulatorTarget.set('value', value);
if (this.get() === initVal) { return this; }
return this.trigger('change');
},
disable: disable,
enable: enable,
hide: hide,
show: show
},
checked: {
get: function() {
return this.$manipulatorTarget.get('checked');