ng2-swipe-cards icon indicating copy to clipboard operation
ng2-swipe-cards copied to clipboard

Undo deletion of element

Open ITServicesAM opened this issue 8 years ago • 2 comments

Hi guys,

i'm trying to add a functionality to undo the deletion of the last liked/disliked element. There is a limited save space for the user you can say and if it is reached you can not save images on like anymore, until you delete some old images. so I want to prevent the last liked/disliked element from deletion. so the user can like this image if he has deleted some old images.

Is this possible? thx in advance :)

ITServicesAM avatar May 13 '17 18:05 ITServicesAM

It is possible, but this is more a question for StackOverflow because it's not really an issue related to the module. If you open a question on StackOverflow instead I can try to help you. Preferably with a plunkr as well.

chrillewoodz avatar May 19 '17 15:05 chrillewoodz

@ITServicesAM I think that in order to get an undo functionality you could simply store in a variable a copy of the item representing the card beeing swipped. So if you want to undo the removal of the card (after releasing it), you could push the stored copy in the array.

Viczei avatar May 21 '17 09:05 Viczei