Author Topic: ScrollView doesn't return to first entry properly  (Read 3884 times)

stapledon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
ScrollView doesn't return to first entry properly
« on: February 12, 2014, 10:34:37 AM »
Hi,

I've got an issue with ScrollView not returning to the first entry in a Grid.

Say I've got 100 elements in a vertical grid, like a leaderboard .... scrolling up and down through the elements is fine, but when scrolling to the top of the grid, it scrolls 1 element too far, so there's a gap between the top of the ScrollView area and the first element. This occurs with or without Momentum/Spring.

Is there a way to prevent this, so scrolling to the top/first element clamps to the first element?

Cheers

(note, all options inc. Restrict Within Panel, Cancel Drag if Fits are enabled, and there is a Scroll Bar).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScrollView doesn't return to first entry properly
« Reply #1 on: February 13, 2014, 01:09:34 AM »
This happens if you use UICenterOnChild, as it always has to center on something. If not, then it shouldn't leave any gaps for you. If you don't use UICenterOnChild, have the latest NGUI version, and can repro the issue in the Scroll View example, I'd love to have the repro case.

stapledon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: ScrollView doesn't return to first entry properly
« Reply #2 on: February 13, 2014, 05:39:11 PM »
Yeah, I'm not using UICenterOnChild - we're in a tight crunch period atm but I'll try and get you an isolated example of it asap (this is 3.49 in Unity 4.3.3f1) ; for now I've replaced the UIGrid with a UITable, which doesn't appear to have the same issue.