fix input with arrows
This commit is contained in:
parent
9e8e145924
commit
8e32500063
1 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue