Dynamic panel drag to limit / points

Hi Saraiva,

I poked through your file and it looks like the equation is set up correctly, but the “OuterDP” local variable that you’re referencing hasn’t been defined yet. Since a variable named OuterDP hasn’t been defined, the “OuterDP.width” part of the equation won’t return the expected value.

To create and define that OuterDP local variable, you’ll want to click the “fx” button in the “Case Editor” to open the “Edit Value” dialog, and then click “Add Local Variable”. Rename the variable from “LVAR1” to “OuterDP”, select “widget” from the middle dropdown menu, and then select the “OuterDP” dynamic panel widget from the last dropdown menu:


Now, the OuterDP local variable will reference the OuterDP dynamic panel when used in that equation, and the expression “OuterDP.width” will return the width of that dynamic panel. After doing this, the horizontal scrolling interaction should work as expected. :slight_smile:

I’d like to mention that you can also create this interaction by using an “OnDrag” interaction with “with drag x” selected and adding left and right boundaries. I attached an example file demonstrating this; feel free to check that out and let me know if you have any questions!
HorizontalDrag_example.rp (61.5 KB)

2 Likes