ker/mod/tfw.gestures.js
function doRegister( event, responsible ) {
    var hammerEvent = getEventNameForPrefix( event, "hammer." );
    if ( hammerEvent && !this._hammer ) {
        this._hammer = new Hammer( this.$, { domEvents: true } );
        // To get domEvents.stopPropagation() available.
        this._hammer.domEvents = true;
    }

    var eventDef = this._events[ event ];
    if ( !eventDef ) {
        var handler = handlerWithChainOfResponsability.bind( this, event );
        eventDef = { chain: [], handler: handler };
        if ( hammerEvent ) this._hammer.on( hammerEvent, handler );
        else this.$.addEventListener( event, handler );
        this._events[ event ] = eventDef;
    }
    eventDef.chain.push( responsible );
}
function doRegister( event, responsible ) {
    var hammerEvent = getEventNameForPrefix( event, "hammer." );
    if ( hammerEvent && !this._hammer ) {
        this._hammer = new Hammer( this.$, { domEvents: true } );
        // To get domEvents.stopPropagation() available.
        this._hammer.domEvents = true;
    }

    var eventDef = this._events[ event ];
    if ( !eventDef ) {
        var handler = handlerWithChainOfResponsability.bind( this, event );
        eventDef = { chain: [], handler: handler };
        if ( hammerEvent ) this._hammer.on( hammerEvent, handler );
        else this.$.addEventListener( event, handler );
        this._events[ event ] = eventDef;
    }
    eventDef.chain.push( responsible );
}
function doRegister ( event , responsible ) { var hammerEvent = getEventNameForPrefix ( event , "hammer." ) ; if ( hammerEvent && ! this . _hammer ) { this . _hammer = new Hammer ( this . $ , { domEvents : true } ) ; // To get domEvents.stopPropagation() available. this . _hammer . domEvents = true ; } var eventDef = this . _events [ event ] ; if ( ! eventDef ) { var handler = handlerWithChainOfResponsability . bind ( this , event ) ; eventDef = { chain : [ ] , handler : handler } ; if ( hammerEvent ) this . _hammer . on ( hammerEvent , handler ) ; else this . $ . addEventListener ( event , handler ) ; this . _events [ event ] = eventDef ; } eventDef . chain . push ( responsible ) ; }
Add a responsability item in the chain of a hammer event.
Add a responsability item in the chain of a hammer event .