PolymerElements / iron-swipeable-container

A container that allows any of its nested children to be swiped away.
25 stars 18 forks source link

Feature Request: the optional ability to swipe elements non-destructively #12

Open kbwatts opened 8 years ago

kbwatts commented 8 years ago

Description

Feature Request: the optional ability to swipe elements non-destructively.

  1. Who will use the feature? “Useful for finger-friendly lists of elements where it's more useful to return to the beginning of the list rather than come to an abrupt end, such as the case with image carousels, or decks of cards”
  2. When will they use the feature? “When I swipe to the end of the list of elements, I want my next swipe to return me to the beginning without having to create net new DOM elements (for example using this with an image carousel)”
  3. What is the user’s goal? “I want to be able to cycle through the list of elements even after I reach the end”

    Live Demo

Example: https://meme-generator.github.io/polymer/index.html (try swiping left or right to navigate forwards and backwards through the list - you may have to refresh after loading it for the first time in order to see the images)

Proposed PR code: https://github.com/kbwatts/iron-swipeable-container/commit/ddbbea7acc5ce63a70d600e7f029d661738714cd

ronnyroeller commented 7 years ago

+1