How to catch mousewheel up/down event using RaphaelJs
- by alex.dominte
I need to implement a horizontal scrollable timeline. I've drawn the timeline/grids/rulers etc. I just need to catch mousewheel up/down to scroll the timeline (backward - past/forward - future).
First I need to catch the event: but nothing I've found seems to work. Need browser support only for chrome/firefox (latest versions).
These 2 won't listeners won't work:
var paper = new Raphael('raphael-paper');
// ...
paper.canvas.on('mousewheel', function(event) {
console.log(event);
});
// ...
paper.canvas.addEventListener('mousewheel', function(event) {
console.log(event);
});