text: /*
   * scrollable-y/mouseup-button.js
   */
  
  "use strict";
  
  var MouseupButton = require('./../default/mouseup-button');
  
  var MouseupOnScrollableYButton = function (options) {
      MouseupButton.prototype.constructor.call(this, options);
      this.tolerance = options.tolerance || 10;
  };
  
  MouseupOnScrollableYButton.prototype = (function (proto) {
      function F() {};
      F.prototype = proto;
      return new F();
  })(MouseupButton.prototype);
  
  MouseupOnScrollableYButton.prototype.constructor = MouseupOnScrollableYButton;
  
  MouseupOnScrollableYButton.prototype.onMousedown = function (evt) {
      if (!this.active) this.startY = evt.clientY;
      MouseupButton.prototype.onMousedown.call(this, evt);
  };
  
  MouseupOnScrollableYButton.prototype._isInActiveZone = function (evt) {
      var x = evt.clientX,
          d = Math.abs(evt.clientY - this.startY),
          b = this.boundaries;
      return x < b.maxX && x > b.minX && d < this.tolerance;
  };
  
  MouseupOnScrollableYButton.prototype.onMousemove = function (evt) {
      if (this.active) {
          if (this._isInActiveZone(evt)) this._addCls();
          else this.onMousecancel.call(this, evt);
      }
  };
  
  module.exports = MouseupOnScrollableYButton;
  