Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t.prototype._getRatioFromEvent = function (e) {
- return (e.clientX - this._dom.getBoundingClientRect().left) / this._dom.offsetWidth
- },
- t.prototype._onMouseDown = function (e) {
- this.ratio = this._getRatioFromEvent(e),
- this.props.onDragStart(e),
- this._addMouseEventToDocument()
- },
- t.prototype._onMouseMove = function (e) {
- this.ratio = this._getRatioFromEvent(e),
- this.isDragging || (this.isDragging = !0),
- this.props.onDragging(e)
- },
- t.prototype._onMouseUp = function (e) {
- this._removeMouseEventFromDocument(),
- this.ratio = this._getRatioFromEvent(e),
- this.isDragging = !1,
- this.props.onDragEnd(e)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement