hammerjs/jquery.hammer.js

bug off event

Opened this issue · 0 comments

Hi,
I am a developer of touchscreen apps that are html based and i really need pay attention to on and off events.
i tested this function in the new version of hammer, and as far as i can say it´s not working, index is always false.

In versions v1.0.6dev works really good.
This is what i normally do: node.obj.off(node.event, node.callback);

off: function offEvent(gestures, handler) {
var self = this;

    console.log("gestures :: ", gestures);
    console.log("handler :: ", handler);

    Event.off(self.element, gestures, handler, function(type) {
        var index = Utils.inArray({ gesture: type, handler: handler });


        console.log("index  :: ", index);


        if(index !== false) {
            self.eventHandlers.splice(index, 1);
        }
    });
    return self;