Help for building a swipe element with repeater for e-mail programme

repeater-widget

#1

Hello!
I would like to build a “slide menu for emails” with repeaters. (Swiping to the left to see “more” marked and trash.) With the help of “mbc66 real mobile gestures” I have already created the Dragabble slideshow. What is still missing is:
What function do I have to set in repeaters so that when an element is dragged to the “left” and I also drag another to the “left”, they are not both left but the first one moves back to the right “normal state”.
So that only one element can be pulled to the left at a time.
Does anyone have any ideas or instructions?

Many thanks in advance


Horizontal fake scroll bar (mobile)
List where items can slide and be clicked
#2

My first thought was to just assign a “move right” action to Mouse Exit to ensure only one panel can be “open” --slid left. However, this would prevent user from engaging with widgets behind the panel (e.g., trash button.) and wouldn’t work with touch-only/mobile UI.

My next thought was to update the repeater when swiping/dragging a row, as that would reset every row to default, thus closing them all. But that would likely slow things down and/or be clunky --if it worked at all.

I then considered a selection group and an Unselected event to “close” the panel–moving it all the way to the right. So, when you uncheck the repeater’s “Isolate Selection Groups” checkbox option, and assign a widget to a selection group, only one instance of that group may be selected at a time. I tested this out and it seems to work pretty well.

slide only 1 row in repeater.rp (62.1 KB)

In the repeater, there is a rectangle to show the row’s label. I created a selection group for this widget, named “repeater panels” (click Show All in the INTERACTIONS pane) and unchecked “Isolate Selection Groups” checkbox for the repeater (also in INTERACTIONS pane.) I then created a dynamic panel from this rectangle, and it sits in front of a trash button. The dynamic panel has a Dragged event to allow it to move left and right to expose or hide the trash button.

Now, here is the important part to ensure only one row can be “open” at a time. The dynamic panel has a Drag Started event that sets “This” to true–which selects the one widget inside its only state. When the rectangle in the current row is selected, all other row’s instances are automatically unselected. The rectangle has an Unselected event with an action to “Move row panel to (0, ) ease out cubic 300” which resets the panel to its default location, with a little animation. I had to create this on the rectangle widget instead of the dynamic panel itself because the latter don’t have Selected / Unselected events. A Drag Dropped event decides whether to open or close the row depending on the location of the dynamic panel and direction of the drag.


#3

Dear mbc66 many, many thanks for the quick reply and the help to an axure newbie :wink: .
Your instructions solve my problem. Best regards from the far north.