Guest User

Untitled

a guest
Oct 19th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. //Edit _handleDragStart function.
  2. _handleDragStart: function(e, ex, ey)
  3. {
  4. // Stop any scrolling of elements in our parent hierarcy.
  5. $.each(this._getScrollHierarchy(),function(i,sv){ sv._stopMScroll(); });
  6. this._stopMScroll();
  7.  
  8. var c = this._$clip;
  9. var v = this._$view;
  10.  
  11. if (this.options.delayedClickEnabled) {
  12. this._$clickEle = $(e.target).closest(this.options.delayedClickSelector);
  13. }
  14.  
  15. this._lastX = this._lastX ? this._lastX : 0;
  16. this._lastY = this._lastY ? this._lastY : 0;
  17.  
  18. var dx = 0;
  19. var dy = 0;
  20.  
  21. // 縦方向のスクロールをキャンセルのために移動距離を算出
  22. dx = Math.abs(this._lastX - ex);
  23. dy = Math.abs(this._lastY - ey);
  24.  
  25. this._lastX = ex;
  26. this._lastY = ey;
  27. this._doSnapBackX = false;
  28. this._doSnapBackY = false;
  29. this._speedX = 0;
  30. this._speedY = 0;
  31. this._directionLock = "";
  32. this._didDrag = false;
  33.  
  34. // 縦方向のスクロールをキャンセル
  35. if (dy > 20 || (dx < 2 && dx < dy) ) {
  36. console.log(dx);
  37. console.log(dy);
  38. return true;
  39. }
  40.  
  41.  
  42. ・・・・
  43.  
  44.  
  45. );
Add Comment
Please, Sign In to add comment