Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Edit _handleDragStart function.
- _handleDragStart: function(e, ex, ey)
- {
- // Stop any scrolling of elements in our parent hierarcy.
- $.each(this._getScrollHierarchy(),function(i,sv){ sv._stopMScroll(); });
- this._stopMScroll();
- var c = this._$clip;
- var v = this._$view;
- if (this.options.delayedClickEnabled) {
- this._$clickEle = $(e.target).closest(this.options.delayedClickSelector);
- }
- this._lastX = this._lastX ? this._lastX : 0;
- this._lastY = this._lastY ? this._lastY : 0;
- var dx = 0;
- var dy = 0;
- // 縦方向のスクロールをキャンセルのために移動距離を算出
- dx = Math.abs(this._lastX - ex);
- dy = Math.abs(this._lastY - ey);
- this._lastX = ex;
- this._lastY = ey;
- this._doSnapBackX = false;
- this._doSnapBackY = false;
- this._speedX = 0;
- this._speedY = 0;
- this._directionLock = "";
- this._didDrag = false;
- // 縦方向のスクロールをキャンセル
- if (dy > 20 || (dx < 2 && dx < dy) ) {
- console.log(dx);
- console.log(dy);
- return true;
- }
- ・・・・
- );
Add Comment
Please, Sign In to add comment