B2G/gecko/browser/devtools/tilt/TiltVisualizer.jsm
/**
   * Adds events listeners required by this controller.
   */
Adds events listeners required by this controller.
Adds events listeners required by this controller .
function TVC_addEventListeners()
  {
    let canvas = this.canvas;
    let presenter = this.presenter;
    canvas.addEventListener("mousedown", this._onMouseDown, false);
    canvas.addEventListener("mouseup", this._onMouseUp, false);
    canvas.addEventListener("mousemove", this._onMouseMove, false);
    canvas.addEventListener("mouseover", this._onMouseOver, false);
    canvas.addEventListener("mouseout", this._onMouseOut, false);
    canvas.addEventListener("MozMousePixelScroll", this._onMozScroll, false);
    canvas.addEventListener("keydown", this._onKeyDown, false);
    canvas.addEventListener("keyup", this._onKeyUp, false);
    canvas.addEventListener("keypress", this._onKeyPress, true);
    canvas.addEventListener("blur", this._onBlur, false);
    presenter.contentWindow.addEventListener("resize", this._onResize, false);
  }
function TVC_addEventListeners ( ) { let canvas = this . canvas ; let presenter = this . presenter ; canvas . addEventListener ( "mousedown" , this . _onMouseDown , false ) ; canvas . addEventListener ( "mouseup" , this . _onMouseUp , false ) ; canvas . addEventListener ( "mousemove" , this . _onMouseMove , false ) ; canvas . addEventListener ( "mouseover" , this . _onMouseOver , false ) ; canvas . addEventListener ( "mouseout" , this . _onMouseOut , false ) ; canvas . addEventListener ( "MozMousePixelScroll" , this . _onMozScroll , false ) ; canvas . addEventListener ( "keydown" , this . _onKeyDown , false ) ; canvas . addEventListener ( "keyup" , this . _onKeyUp , false ) ; canvas . addEventListener ( "keypress" , this . _onKeyPress , true ) ; canvas . addEventListener ( "blur" , this . _onBlur , false ) ; presenter . contentWindow . addEventListener ( "resize" , this . _onResize , false ) ; }
Adds events listeners required by this controller.
Adds events listeners required by this controller .
// bind commonly used mouse and keyboard events with the controller // handle resize events to change the arcball dimensions