Dynamic Panels - Moving Objects & Reverting to Original Position

TLDR: After I move an object within a panel state (1) & then change panel states (2), when I change the panel state back to 1, the object doesn’t revert to its original position but is instead at the position I moved it to earlier.

I have a panel as a dynamic panel with several states.
There are four links at the top with a underline under each navigation item.
When a user clicks on one of the navigation items, I animate the underline (moving it from the current nav item to the new nav item), then I set the panel state to that particular page.

For example. User is on the ‘home’ page of the panel. The user clicks the ‘info’ navigation link within the panel. This triggers an interaction: OnClick (move underline; 650ms). Wait (100ms) Set panel state to ‘info’. The ‘underline’ moves to the exact coordinates the underline has on the ‘info’ page.

From this point on the info pane, when I click on the ‘home’ navigation I reverse this process by moving the underline under ‘info’ to the coordinates of the underline for the ‘home’ page (the original, initial position). However, when I set the panel state to ‘home,’ the underline is at the first position I sent it to (i.e., under the ‘info’ navigation item) instead of the initial state under 'home.'

It’s as if the underline doesn’t revert to its original state when I trigger ‘set panel state.’ Rather, it exists at the last position I moved it to.

Correct. If you reload the whole page everything would revert to their original positions/states/styles/etc. But anytime you manually move something, it will stay where you moved it.

A different (likely better) approach is to control your animations–and anything else resulting strictly from dynamic panel state changes–with the dynamic panel’s Panel State Changed event. For instance, you can cut your Move action(s) from the “info” nav link widget and paste to the dynamic panel’s Panel State Changed, and then set up a conditional case with “IF state of This equals Info” (assuming you’ve named it “Info”; by default it would be “State 2” or whatever.) Copy this conditional case to handle all your states. Think of this like an object-oriented approach, where the dynamic panel takes care of itself. In this way, no matter how the dp state gets changed, your widgets should get moved correctly.

I still feel like that’s problematic because when you change the panel state, the underline is a distinct and different object (each panel state has its own instances; i.e., the underline object isn’t unique throughout the dynamic panel.)

I guess I misunderstood your setup from your description alone. Could you post your RP file here?