src/captors/sigma.captors.mouse.js
function _upHandler(e) {
      if (_settings('mouseEnabled') && _isMouseDown) {
        _isMouseDown = false;
        if (_movingTimeoutId)
          clearTimeout(_movingTimeoutId);

        _camera.isMoving = false;

        var x = sigma.utils.getX(e),
            y = sigma.utils.getY(e);

        if (_isMoving) {
          sigma.misc.animation.killAll(_camera);
          sigma.misc.animation.camera(
            _camera,
            {
              x: _camera.x +
                _settings('mouseInertiaRatio') * (_camera.x - _lastCameraX),
              y: _camera.y +
                _settings('mouseInertiaRatio') * (_camera.y - _lastCameraY)
            },
            {
              easing: 'quadraticOut',
              duration: _settings('mouseInertiaDuration')
            }
          );
        } else if (
          _startMouseX !== x ||
          _startMouseY !== y
        )
          _camera.goTo({
            x: _camera.x,
            y: _camera.y
          });

        _self.dispatchEvent('mouseup',
          sigma.utils.mouseCoords(e));

        // Update _isMoving flag:
        _isMoving = false;
      }
    }
function _upHandler(e) {
      if (_settings('mouseEnabled') && _isMouseDown) {
        _isMouseDown = false;
        if (_movingTimeoutId)
          clearTimeout(_movingTimeoutId);

        _camera.isMoving = false;

        var x = sigma.utils.getX(e),
            y = sigma.utils.getY(e);

        if (_isMoving) {
          sigma.misc.animation.killAll(_camera);
          sigma.misc.animation.camera(
            _camera,
            {
              x: _camera.x +
                _settings('mouseInertiaRatio') * (_camera.x - _lastCameraX),
              y: _camera.y +
                _settings('mouseInertiaRatio') * (_camera.y - _lastCameraY)
            },
            {
              easing: 'quadraticOut',
              duration: _settings('mouseInertiaDuration')
            }
          );
        } else if (
          _startMouseX !== x ||
          _startMouseY !== y
        )
          _camera.goTo({
            x: _camera.x,
            y: _camera.y
          });

        _self.dispatchEvent('mouseup',
          sigma.utils.mouseCoords(e));

        // Update _isMoving flag:
        _isMoving = false;
      }
    }
function _upHandler ( e ) { if ( _settings ( 'mouseEnabled' ) && _isMouseDown ) { _isMouseDown = false ; if ( _movingTimeoutId ) clearTimeout ( _movingTimeoutId ) ; _camera . isMoving = false ; var x = sigma . utils . getX ( e ) , y = sigma . utils . getY ( e ) ; if ( _isMoving ) { sigma . misc . animation . killAll ( _camera ) ; sigma . misc . animation . camera ( _camera , { x : _camera . x + _settings ( 'mouseInertiaRatio' ) * ( _camera . x - _lastCameraX ) , y : _camera . y + _settings ( 'mouseInertiaRatio' ) * ( _camera . y - _lastCameraY ) } , { easing : 'quadraticOut' , duration : _settings ( 'mouseInertiaDuration' ) } ) ; } else if ( _startMouseX !== x || _startMouseY !== y ) _camera . goTo ( { x : _camera . x , y : _camera . y } ) ; _self . dispatchEvent ( 'mouseup' , sigma . utils . mouseCoords ( e ) ) ; // Update _isMoving flag: _isMoving = false ; } }
The handler listening to the 'up' mouse event. It will stop dragging the
graph.

@param {event} e A mouse event.
The handler listening to the up mouse event . It will stop dragging the graph .