Author Topic: ScrollView CenterOnClick - only within clipping area.  (Read 1049 times)

wallabie

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 200
    • View Profile
ScrollView CenterOnClick - only within clipping area.
« on: May 19, 2014, 04:05:34 AM »
Use Case:

In a scrollView, the user clicks an object that is half way out of the clipping area.  ATM I'm using the CenterOnClick component and it springs the item to the center of the scrollView.  Instead of springing the item all the way to the center, I would like the item to move only a little so that it just inside of the clipping area.  In cases where items are already fully within the clipping area, do not move at all.  How can something be done.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScrollView CenterOnClick - only within clipping area.
« Reply #1 on: May 19, 2014, 01:15:15 PM »
You wouldn't use UICenterOnChild / UICenterOnClick here. You would write your own component with logic that would only move items into view and not to the center.