fix home screen bugs

This commit is contained in:
rolux 2012-02-19 14:55:08 +00:00
parent 1a92d2a315
commit 7398993bc1

View file

@ -375,11 +375,14 @@ pandora.ui.home = function() {
.hide()
.bindEvent({
mousedown: function() {
counter = 0;
scrollToPosition(position - 1, true);
},
mouserepeat: function() {
if (counter++ % 10 == 0) {
scrollToPosition(position - 1, false);
}
}
})
.appendTo($listsBox);
$nextButton = Ox.Button({
@ -400,7 +403,9 @@ pandora.ui.home = function() {
scrollToPosition(position + 1, true);
},
mouserepeat: function() {
Ox.print('---------------------------')
if (counter++ % 10 == 0) {
Ox.print('YES')
scrollToPosition(position + 1, false);
}
}
@ -423,9 +428,10 @@ pandora.ui.home = function() {
},
mousewheel: function(e, delta, deltaX, deltaY) {
Ox.print('mwd', deltaX)
scrollToPosition(position + Math.round(deltaX), true);
scrollToPosition(position + Math.round(deltaX * 2), true);
}
});
}
self.keydown = function(e) {
var focused = Ox.Focus.focused(),
key = Ox.KEYS[e.keyCode];
@ -445,7 +451,6 @@ pandora.ui.home = function() {
}
};
Ox.$document.bind({keydown: self.keydown});
}
lists.forEach(function(list, i) {
$listBox[i] = $('<div>')
.css({