mudcube / Event.js

:hand: Multi-touch, gestures, and other events—click, dblclick, dbltap, tap, longpress, drag, swipe, pinch, rotate, shake. For pointer events, each listener can handle anywhere from 1 to 12 fingers at a time, or more, depending on the device. Includes MetaKey tracking (CMD, CTRL) to support native key-commands in various platforms.
MIT License
368 stars 68 forks source link

obj.wheelDelta is always zero for SVG element #14

Closed stodge closed 9 years ago

stodge commented 9 years ago

I upgraded my local copy of Event.js and now the mousewheel doesn't work anymore. I'm attaching the event handler to an SVG element:

        eventjs.add(document.getElementById("root"), "wheel", function(evt, obj) {
            eventjs.prevent(evt);

            if (obj.state === "end") {            
                var wheelFactor = - 1/40 * obj.wheelDelta;
                console.debug("Wheel Delta: %o", obj.wheelDelta);
.......

obj.wheelDelta is always 0. Is anyone else seeing this?

stodge commented 9 years ago

I'm not sure what changed, but I can work around this.