Author Topic: Mouse wheel scrolling doesn't work after drag and drop (Version 3.9.2)  (Read 6357 times)

kakkou

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 7
    • View Profile
" Example 11 - Drag & Drop" but it occurs.

UIDragDropItem makes mDragScrollView disable at the time of drug starting.
Because UIScrollView.Press (false) in UIDragScrollView isn't called at the time of a drug end.
UIScrollView.mPressed won't be false, so you keep clearing UIScrollView.mScroll.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Mouse wheel scrolling doesn't work after drag and drop (Version 3.9.2)
« Reply #1 on: November 25, 2015, 05:12:20 PM »
Try simply adding "mPressed = false;" to UIScrollView's OnDisable function.
  1. void OnDisable () { list.Remove(this); mPressed = false; }

kakkou

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Mouse wheel scrolling doesn't work after drag and drop (Version 3.9.2)
« Reply #2 on: December 01, 2015, 05:05:39 AM »
UIScrollView isn't invalidated in case of Drag&Drop, so it isn't improved by the correction.

The cause is because UIDragScrollView.OnPress (false) isn't called to the time of a mouse release of an item.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Mouse wheel scrolling doesn't work after drag and drop (Version 3.9.2)
« Reply #3 on: December 01, 2015, 07:47:56 AM »
Had a look into this.. add this to UIDragScrollView and it fixes the issue:
  1.         void OnDisable ()
  2.         {
  3.                 if (mScroll != null)
  4.                 {
  5.                         mScroll.Press(false);
  6.                         mScroll = null;
  7.                 }
  8.         }

kakkou

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Mouse wheel scrolling doesn't work after drag and drop (Version 3.9.2)
« Reply #4 on: December 01, 2015, 09:13:23 PM »
A problem was settled. ;D
Thank you!