src/basis/dom/event.js
function mouseButton(event, button){
    if (typeof event.which == 'number')
      // DOM scheme
      return event.which == button.VALUE;
    else
      // IE6-8
      return !!(event.button & button.BIT);
  }
function mouseButton(event, button){
    if (typeof event.which == 'number')
      // DOM scheme
      return event.which == button.VALUE;
    else
      // IE6-8
      return !!(event.button & button.BIT);
  }
function mouseButton ( event , button ) { if ( typeof event . which == 'number' ) // DOM scheme return event . which == button . VALUE ; else // IE6-8 return ! ! ( event . button & button . BIT ) ; }
Checks if pressed mouse button equal to desire mouse button.
@param {Event} event
@param {object} button One of MOUSE constant
@return {boolean}
Checks if pressed mouse button equal to desire mouse button .