1
0
Fork 0
forked from 0x2620/oxjs

updates to url and filter

This commit is contained in:
rlx 2011-11-10 22:47:38 +00:00
commit d2a2ddb66e
4 changed files with 73 additions and 19 deletions

View file

@ -30,6 +30,7 @@ Ox.Range = function(options, self) {
self = self || {};
var that = Ox.Element({}, self)
.defaults({
// fixme: needs a changeOnDrag option (default true)
arrows: false,
arrowStep: 1,
arrowSymbols: ['left', 'right'],
@ -240,7 +241,9 @@ Ox.Range = function(options, self) {
}
function setValue(value, animate) {
value = Ox.limit(value, self.options.min, self.options.max);
// fixme: toPrecision helps with imprecise results of divisions,
// but won't work for very large values. And is 10 a good value?
value = Ox.limit(value.toPrecision(10), self.options.min, self.options.max);
if (value != self.options.value) {
//time = getTime(self.options.value, value);
self.options.value = value;
@ -259,6 +262,15 @@ Ox.Range = function(options, self) {
}
}
that.value = function() {
if (arguments.length == 0) {
return self.options.value;
} else {
self.options.type = arguments[0];
setThumb();
}
};
return that;
};