addEvents()
    {
        if (!this.interactionDOMElement)
        {
            return;
        }

        core.ticker.shared.add(this.update, this);

        if (window.navigator.msPointerEnabled)
        {
            this.interactionDOMElement.style['-ms-content-zooming'] = 'none';
            this.interactionDOMElement.style['-ms-touch-action'] = 'none';
        }
        else if (this.supportsPointerEvents)
        {
            this.interactionDOMElement.style['touch-action'] = 'none';
        }

        /**
         * These events are added first, so that if pointer events are normalised, they are fired
         * in the same order as non-normalised events. ie. pointer event 1st, mouse / touch 2nd
         */
        if (this.supportsPointerEvents)
        {
            window.document.addEventListener('pointermove', this.onPointerMove, true);
            this.interactionDOMElement.addEventListener('pointerdown', this.onPointerDown, true);
            // pointerout is fired in addition to pointerup (for touch events) and pointercancel
            // we already handle those, so for the purposes of what we do in onPointerOut, we only
            // care about the pointerleave event
            this.interactionDOMElement.addEventListener('pointerleave', this.onPointerOut, true);
            this.interactionDOMElement.addEventListener('pointerover', this.onPointerOver, true);
            window.addEventListener('pointercancel', this.onPointerCancel, true);
            window.addEventListener('pointerup', this.onPointerUp, true);
        }

        else
        {
            window.document.addEventListener('mousemove', this.onPointerMove, true);
            this.interactionDOMElement.addEventListener('mousedown', this.onPointerDown, true);
            this.interactionDOMElement.addEventListener('mouseout', this.onPointerOut, true);
            this.interactionDOMElement.addEventListener('mouseover', this.onPointerOver, true);
            window.addEventListener('mouseup', this.onPointerUp, true);

            if (this.supportsTouchEvents)
            {
                this.interactionDOMElement.addEventListener('touchstart', this.onPointerDown, true);
                this.interactionDOMElement.addEventListener('touchcancel', this.onPointerCancel, true);
                this.interactionDOMElement.addEventListener('touchend', this.onPointerUp, true);
                this.interactionDOMElement.addEventListener('touchmove', this.onPointerMove, true);
            }
        }

        this.eventsAdded = true;
    }
/**
     * Registers all the DOM events
     *
     * @private
     */
Registers all the DOM events
@private
Registers all the DOM events @private
addEvents()
    {
        if (!this.interactionDOMElement)
        {
            return;
        }
        core.ticker.shared.add(this.update, this);
        if (window.navigator.msPointerEnabled)
        {
            this.interactionDOMElement.style['-ms-content-zooming'] = 'none';
            this.interactionDOMElement.style['-ms-touch-action'] = 'none';
        }
        else if (this.supportsPointerEvents)
        {
            this.interactionDOMElement.style['touch-action'] = 'none';
        }
        if (this.supportsPointerEvents)
        {
            window.document.addEventListener('pointermove', this.onPointerMove, true);
            this.interactionDOMElement.addEventListener('pointerdown', this.onPointerDown, true);
            this.interactionDOMElement.addEventListener('pointerleave', this.onPointerOut, true);
            this.interactionDOMElement.addEventListener('pointerover', this.onPointerOver, true);
            window.addEventListener('pointercancel', this.onPointerCancel, true);
            window.addEventListener('pointerup', this.onPointerUp, true);
        }
        else
        {
            window.document.addEventListener('mousemove', this.onPointerMove, true);
            this.interactionDOMElement.addEventListener('mousedown', this.onPointerDown, true);
            this.interactionDOMElement.addEventListener('mouseout', this.onPointerOut, true);
            this.interactionDOMElement.addEventListener('mouseover', this.onPointerOver, true);
            window.addEventListener('mouseup', this.onPointerUp, true);
            if (this.supportsTouchEvents)
            {
                this.interactionDOMElement.addEventListener('touchstart', this.onPointerDown, true);
                this.interactionDOMElement.addEventListener('touchcancel', this.onPointerCancel, true);
                this.interactionDOMElement.addEventListener('touchend', this.onPointerUp, true);
                this.interactionDOMElement.addEventListener('touchmove', this.onPointerMove, true);
            }
        }
        this.eventsAdded = true;
    }
addEvents ( ) { if ( ! this . interactionDOMElement ) { return ; } core . ticker . shared . add ( this . update , this ) ; if ( window . navigator . msPointerEnabled ) { this . interactionDOMElement . style [ '-ms-content-zooming' ] = 'none' ; this . interactionDOMElement . style [ '-ms-touch-action' ] = 'none' ; } else if ( this . supportsPointerEvents ) { this . interactionDOMElement . style [ 'touch-action' ] = 'none' ; } if ( this . supportsPointerEvents ) { window . document . addEventListener ( 'pointermove' , this . onPointerMove , true ) ; this . interactionDOMElement . addEventListener ( 'pointerdown' , this . onPointerDown , true ) ; this . interactionDOMElement . addEventListener ( 'pointerleave' , this . onPointerOut , true ) ; this . interactionDOMElement . addEventListener ( 'pointerover' , this . onPointerOver , true ) ; window . addEventListener ( 'pointercancel' , this . onPointerCancel , true ) ; window . addEventListener ( 'pointerup' , this . onPointerUp , true ) ; } else { window . document . addEventListener ( 'mousemove' , this . onPointerMove , true ) ; this . interactionDOMElement . addEventListener ( 'mousedown' , this . onPointerDown , true ) ; this . interactionDOMElement . addEventListener ( 'mouseout' , this . onPointerOut , true ) ; this . interactionDOMElement . addEventListener ( 'mouseover' , this . onPointerOver , true ) ; window . addEventListener ( 'mouseup' , this . onPointerUp , true ) ; if ( this . supportsTouchEvents ) { this . interactionDOMElement . addEventListener ( 'touchstart' , this . onPointerDown , true ) ; this . interactionDOMElement . addEventListener ( 'touchcancel' , this . onPointerCancel , true ) ; this . interactionDOMElement . addEventListener ( 'touchend' , this . onPointerUp , true ) ; this . interactionDOMElement . addEventListener ( 'touchmove' , this . onPointerMove , true ) ; } } this . eventsAdded = true ; }
Registers all the DOM events
 @private
Registers all the DOM events @private
/**
         * These events are added first, so that if pointer events are normalised, they are fired
         * in the same order as non-normalised events. ie. pointer event 1st, mouse / touch 2nd
         */ // pointerout is fired in addition to pointerup (for touch events) and pointercancel // we already handle those, so for the purposes of what we do in onPointerOut, we only // care about the pointerleave event