public/js-roguelike-skeleton/src/mouse.js
function(element){
            if(this._boundElement){
                this.stopListening();
            }

            element.addEventListener('mousemove', this);
            element.addEventListener('mouseenter', this);
            element.addEventListener('mouseleave', this);
            element.addEventListener('click', this);

            this._boundElement = element;
        }
function(element){
            if(this._boundElement){
                this.stopListening();
            }

            element.addEventListener('mousemove', this);
            element.addEventListener('mouseenter', this);
            element.addEventListener('mouseleave', this);
            element.addEventListener('click', this);

            this._boundElement = element;
        }
function ( element ) { if ( this . _boundElement ) { this . stopListening ( ) ; } element . addEventListener ( 'mousemove' , this ) ; element . addEventListener ( 'mouseenter' , this ) ; element . addEventListener ( 'mouseleave' , this ) ; element . addEventListener ( 'click' , this ) ; this . _boundElement = element ; }
Binds event listener for mouse events.
@method startListening
@param {HTMLElement} element - The dom element being rendered to.
Binds event listener for mouse events .