Allow navigation with Mousewheel too
onigetoc opened this issue · comments
Gino commented
How can i implement and add mousewheel navigation with spatial navigation?
May be with this jQuery plugin
https://plugins.jquery.com/mousewheel/
https://stackoverflow.com/questions/29652911/catch-mousewheel-up-or-down-with-jquery-js-without-actually-scrolling/29656088#29656088
Luke Chang commented
Yeah, it's a good option. Maybe you can do something like:
$(window).mousewheel(function(turn, delta) {
if (delta == 1) {
SpatialNavigation.move("down");
} else {
SpatialNavigation.move("up");
}
return false;
});
Gino commented
Thank you, this is exactly what i did yesterday and it's working.
Mousewheel + Sound navigation.
Far from perfect, i will try to center focused element on overflow.
http://tvcast.top/scripts/js-spatial-navigation-master/demo/3.2_like_youtube_tv-mousewheel.html
Luke Chang commented
Good to know it works. :)