fix input with arrows

This commit is contained in:
rolux 2015-02-21 12:47:11 +05:30
parent 9e8e145924
commit 8e32500063

View file

@ -235,7 +235,7 @@ Ox.Input = function(options, self) {
.css({float: 'left'})
.on({
click: function() {
clickArrow(0);
clickArrow(-1);
}
})
.appendTo(that),
@ -247,7 +247,7 @@ Ox.Input = function(options, self) {
.css({float: 'right'})
.on({
click: function() {
clickArrow(0);
clickArrow(1);
}
})
.appendTo(that)
@ -714,7 +714,7 @@ Ox.Input = function(options, self) {
function clickArrow(i) {
var originalValue = self.options.value;
self.options.value = Ox.limit(
parseFloat(self.options.value) + (i == 0 ? -1 : 1) * self.options.arrowStep,
parseFloat(self.options.value) + i * self.options.arrowStep,
self.options.min,
self.options.max
).toString();