Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: justinISO on September 18, 2013, 11:53:01 AM

Title: Draggable Panel resets to wrong position.
Post by: justinISO on September 18, 2013, 11:53:01 AM
Hello,
I have a iOS Style Scrolling Table view with different levels that I am making with NGUI. It is working great for the most part.

Structured as:

Level One - Clipped - Draggable Panel
  --Level One Buttons - Grid - Drag Panel Contents
    --Button One -Drag Panel Contents
    --Button Two -Drag Panel Contents
    .
    .
    .


Level Two - Clipped Draggable Panel
  --Level Two Buttons - Grid - Drag Panel Contents
    --Back Button - Drag Panel Contents
    --Button One -Drag Panel Contents
    --Button Two - Drag Panel Contents
    .
    .
    .

I have a Draggable Panel that has a grid with buttons for each level of detail. So when the user presses a button on level one, that tweens out the Grid containing them and level two grid tweens in. The panels are only draggable on the Y when the buttons don't fit, and all of the panels have the same position and clipping area.

The problem I am having is on random occasions when I click the back button ( E.G. tween level 3 grid off and tween level 2 grid on) the Clipped Draggable Panel that has the level two buttons will be snapped to a different x value. All of the Clipped Draggable Panels have an x position of 168 and randomly one of them will snap to 161 or some strange value that is random and unwanted. Their x value should never change, a random spring panel just shows up and moves it.

I have no code that touches a spring panel or moves the panel itself other than the default dragging code so I think I am just missing a setting or structured something wrong perhaps?

I hope I was able to explain that clearly enough :-\

Thanks for any help!

~Justin
Title: Re: Draggable Panel resets to wrong position.
Post by: ArenMook on September 18, 2013, 01:39:07 PM
Spring Panel is used to move the panel into place when the content is outside its bounds. If I understand correctly, you are trying to move the content of the draggable panel yourself?
Title: Re: Draggable Panel resets to wrong position.
Post by: justinISO on September 18, 2013, 04:18:08 PM
Correct, I slide the content on and off the the clipping plane depending on what level of the menu they are in.
Title: Re: Draggable Panel resets to wrong position.
Post by: justinISO on September 19, 2013, 04:17:24 PM
Should I not be doing this? Is there a way I can disable the spring panel affecting the x axis?
Title: Re: Draggable Panel resets to wrong position.
Post by: ArenMook on September 19, 2013, 04:19:35 PM
I would say "don't do it", or at least disable all drag-related scripts including UIDraggablePanel while you do it.