src/js/hammer.js
function(recognizer) {
        if (invokeArrayArg(recognizer, 'add', this)) {
            return this;
        }

        // remove existing
        var existing = this.get(recognizer.options.event);
        if (existing) {
            this.remove(existing);
        }

        this.recognizers.push(recognizer);
        recognizer.manager = this;

        this.touchAction.update();
        return recognizer;
    }
function(recognizer) {
        if (invokeArrayArg(recognizer, 'add', this)) {
            return this;
        }

        // remove existing
        var existing = this.get(recognizer.options.event);
        if (existing) {
            this.remove(existing);
        }

        this.recognizers.push(recognizer);
        recognizer.manager = this;

        this.touchAction.update();
        return recognizer;
    }
function ( recognizer ) { if ( invokeArrayArg ( recognizer , 'add' , this ) ) { return this ; } // remove existing var existing = this . get ( recognizer . options . event ) ; if ( existing ) { this . remove ( existing ) ; } this . recognizers . push ( recognizer ) ; recognizer . manager = this ; this . touchAction . update ( ) ; return recognizer ; }
add a recognizer to the manager
existing recognizers with the same event name will be removed
@param {Recognizer} recognizer
@returns {Recognizer|Manager}
add a recognizer to the manager existing recognizers with the same event name will be removed