Comparing version 0.6.0-beta.4 to 0.6.0-beta.5
@@ -1857,4 +1857,8 @@ function _defineProperty(obj, key, value) { | ||
var offset = _extends({}, this._scrollbars[type].getBoundingClientRect()); | ||
var offset = this._scrollbars[type].getBoundingClientRect(); | ||
offset = { | ||
left: offset.left, | ||
top: offset.top | ||
}; | ||
offset.left += window.pageXOffset; | ||
@@ -1865,3 +1869,3 @@ offset.top += window.pageYOffset; | ||
if (this._containerMouseDownTimer !== null) { | ||
if (this._containerMouseDownTimer) { | ||
return; | ||
@@ -1871,5 +1875,5 @@ } | ||
if (type === 'x') { | ||
direction = pageX - offset.left - this._scroller.__scrollLeft; | ||
direction = pageX - offset.left - this._scroller.__scrollLeft / this._ratio.x; | ||
} else { | ||
direction = pageY - offset.top - this._scroller.__scrollTop; | ||
direction = pageY - offset.top - this._scroller.__scrollTop / this._ratio.y; | ||
} | ||
@@ -1887,5 +1891,5 @@ | ||
if (type === 'x') { | ||
pos = pageX - offset.left - scrollPosition; | ||
pos = pageX - offset.left - scrollPosition / _this5._ratio.x; | ||
} else { | ||
pos = pageY - offset.top - scrollPosition; | ||
pos = pageY - offset.top - scrollPosition / _this5._ratio.y; | ||
} | ||
@@ -1919,3 +1923,6 @@ | ||
_proto._endScroll = function _endScroll() { | ||
this._containerMouseDownTimer && clearTimeout(this._containerMouseDownTimer); | ||
if (this._containerMouseDownTimer) { | ||
clearTimeout(this._containerMouseDownTimer); | ||
} | ||
this._containerMouseDownTimer = null; | ||
@@ -1922,0 +1929,0 @@ }; |
{ | ||
"name": "zscroller", | ||
"description": "dom scroller based on zynga scroller", | ||
"version": "0.6.0-beta.4", | ||
"version": "0.6.0-beta.5", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
181691
1631