Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Alessaint on February 25, 2014, 01:17:36 AM
-
I have a horizontal scrollview with a grid that is filled with items instantiated at runtime. After they are instantiated I run Reposition() on the grid and everything looks fine. The problem is that when I drag the item away from the scroll view and release so it returns back to the grid the scrollview y position changes - the scrollview moves down a bit. Any idea why does this happen? Thanks.
EDIT: this seems to happen when processing RestrictWithinBounds - is it possible that this isn't taken into account when repositioning the new elements but only when one gets returned to its child grid?
-
Restrict function should only adjust position on the axes that are possible by the scroll view itself. So if you set the scroll view to be horizontal, then it won't move along the Y at all. Other than that, I can't tell you why yours is moving as I don't know anything about your setup.