dist/mouse-edges.js
function MouseEdges(parent, options) {
        _classCallCheck(this, MouseEdges);

        var _this = _possibleConstructorReturn(this, (MouseEdges.__proto__ || Object.getPrototypeOf(MouseEdges)).call(this, parent));

        options = options || {};
        _this.options = options;
        _this.reverse = options.reverse ? 1 : -1;
        _this.noDecelerate = options.noDecelerate;
        _this.linear = options.linear;
        _this.radiusSquared = Math.pow(options.radius, 2);
        _this.resize();
        _this.speed = options.speed || 8;
        return _this;
    }
function MouseEdges(parent, options) {
        _classCallCheck(this, MouseEdges);

        var _this = _possibleConstructorReturn(this, (MouseEdges.__proto__ || Object.getPrototypeOf(MouseEdges)).call(this, parent));

        options = options || {};
        _this.options = options;
        _this.reverse = options.reverse ? 1 : -1;
        _this.noDecelerate = options.noDecelerate;
        _this.linear = options.linear;
        _this.radiusSquared = Math.pow(options.radius, 2);
        _this.resize();
        _this.speed = options.speed || 8;
        return _this;
    }
Scroll viewport when mouse hovers near one of the edges.
@private
@param {Viewport} parent
@param {object} [options]
@param {number} [options.radius] distance from center of screen in screen pixels
@param {number} [options.distance] distance from all sides in screen pixels
@param {number} [options.top] alternatively, set top distance (leave unset for no top scroll)
@param {number} [options.bottom] alternatively, set bottom distance (leave unset for no top scroll)
@param {number} [options.left] alternatively, set left distance (leave unset for no top scroll)
@param {number} [options.right] alternatively, set right distance (leave unset for no top scroll)
@param {number} [options.speed=8] speed in pixels/frame to scroll viewport
@param {boolean} [options.reverse] reverse direction of scroll
@param {boolean} [options.noDecelerate] don't use decelerate plugin even if it's installed
@param {boolean} [options.linear] if using radius, use linear movement (+/- 1, +/- 1) instead of angled movement (Math.cos(angle from center), Math.sin(angle from center))
@param {boolean} [options.allowButtons] allows plugin to continue working even when there's a mousedown event

@event mouse-edge-start(Viewport) emitted when mouse-edge starts
@event mouse-edge-end(Viewport) emitted when mouse-edge ends