function GrabToPan(options) {
    this.element = options.element;
    this.document = options.element.ownerDocument;
    if (typeof options.ignoreTarget === 'function') {
      this.ignoreTarget = options.ignoreTarget;
    }
    this.onActiveChanged = options.onActiveChanged;

    // Bind the contexts to ensure that `this` always points to
    // the GrabToPan instance.
    this.activate = this.activate.bind(this);
    this.deactivate = this.deactivate.bind(this);
    this.toggle = this.toggle.bind(this);
    this._onmousedown = this._onmousedown.bind(this);
    this._onmousemove = this._onmousemove.bind(this);
    this._endPan = this._endPan.bind(this);

    // This overlay will be inserted in the document when the mouse moves during
    // a grab operation, to ensure that the cursor has the desired appearance.
    var overlay = this.overlay = document.createElement('div');
    overlay.className = 'grab-to-pan-grabbing';
  }
/**
   * Construct a GrabToPan instance for a given HTML element.
   * @param options.element {Element}
   * @param options.ignoreTarget {function} optional. See `ignoreTarget(node)`
   * @param options.onActiveChanged {function(boolean)} optional. Called
   *  when grab-to-pan is (de)activated. The first argument is a boolean that
   *  shows whether grab-to-pan is activated.
   */
Construct a GrabToPan instance for a given HTML element.
Construct a GrabToPan instance for a given HTML element .
function GrabToPan(options) {
    this.element = options.element;
    this.document = options.element.ownerDocument;
    if (typeof options.ignoreTarget === 'function') {
      this.ignoreTarget = options.ignoreTarget;
    }
    this.onActiveChanged = options.onActiveChanged;
    this.activate = this.activate.bind(this);
    this.deactivate = this.deactivate.bind(this);
    this.toggle = this.toggle.bind(this);
    this._onmousedown = this._onmousedown.bind(this);
    this._onmousemove = this._onmousemove.bind(this);
    this._endPan = this._endPan.bind(this);
    var overlay = this.overlay = document.createElement('div');
    overlay.className = 'grab-to-pan-grabbing';
  }
function GrabToPan ( options ) { this . element = options . element ; this . document = options . element . ownerDocument ; if ( typeof options . ignoreTarget === 'function' ) { this . ignoreTarget = options . ignoreTarget ; } this . onActiveChanged = options . onActiveChanged ; this . activate = this . activate . bind ( this ) ; this . deactivate = this . deactivate . bind ( this ) ; this . toggle = this . toggle . bind ( this ) ; this . _onmousedown = this . _onmousedown . bind ( this ) ; this . _onmousemove = this . _onmousemove . bind ( this ) ; this . _endPan = this . _endPan . bind ( this ) ; var overlay = this . overlay = document . createElement ( 'div' ) ; overlay . className = 'grab-to-pan-grabbing' ; }
Construct a GrabToPan instance for a given HTML element.
Construct a GrabToPan instance for a given HTML element .
// Bind the contexts to ensure that `this` always points to // the GrabToPan instance. // This overlay will be inserted in the document when the mouse moves during // a grab operation, to ensure that the cursor has the desired appearance.