Author Topic: Scrollview no longer restricted to bounds with 3.9.8  (Read 3837 times)

Cabal

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 16
    • View Profile
Scrollview no longer restricted to bounds with 3.9.8
« on: May 12, 2016, 12:33:35 PM »
Hi all,

We upgrade to NGUI 3.9.8 and the draggable scrollview we are using for our in-game map can now be scrolled past is bounds, which is not what it was doing before.

Looking at UIScrollView.cs I see the function Drag() used to call RestrictWithinBounds (line 876) but it no longer does with the new version. I verified that un-commenting that if blocks restores the previous behavior of restricting the scrollview to its bounds. Was this change intentional? Is there a new way of restricting the scrollview to its bounds that does not require this code?

(Note that when the scrollview starts it isn't properly restricted, but dragging it will enforce the restriction)

The UIPanel is set to "Constrain but don't clip" and the scrollview to "Restrict within panel" with "Unrestricted" movement (which is what we had before)

Thanks.

Stephane

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrollview no longer restricted to bounds with 3.9.8
« Reply #1 on: May 14, 2016, 06:22:59 PM »
The check-in message for that change was "FIX: UIWrapContent not playing well with the latest changes."

I am not sure what adverse effects uncommenting it again will have at this point, but if it works for you, just keep it at such.