Author Topic: UICenterOnChild bug  (Read 1926 times)

hrlarsen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 35
    • View Profile
UICenterOnChild bug
« on: March 19, 2014, 11:53:52 AM »
When having a UICenterOnChild component in a scroll view, it resets when just clicking on a drag child. It works fine when just dragging around. Here is my hierarchy:

UIScrollView
- (UIGrid + UICenterOnChild)
- - (UIWidget + Collider + UIDragScrollView)
- - (UIWidget + Collider + UIDragScrollView)
- - (UIWidget + Collider + UIDragScrollView)
....

Anything I am doing wrong? I have attached the settings of the components

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UICenterOnChild bug
« Reply #1 on: March 20, 2014, 01:32:14 AM »
What do you mean by "resets"?

Also you are missing UICenterOnClick on your widgets.

hrlarsen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 35
    • View Profile
Re: UICenterOnChild bug
« Reply #2 on: March 20, 2014, 10:02:27 AM »
It snaps back the the first widget in the hierarchy. As if ResetPosition() was called on the ScrollView, but it's not. I noticed that UpdatePosition in the ScrollView is called everytime this "snap to the beginning" is happening.

I was able to replicate it setting up a new scene with the hierarchy described in the first post.

I just put centerOnClick on all widgets under the grid/centerOnChild component, though it did not make any difference.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UICenterOnChild bug
« Reply #3 on: March 20, 2014, 12:58:00 PM »
What's the call stack? Resetting happens when you resize a scroll view that doesn't have a scroll bar, I know that much.