-
Notifications
You must be signed in to change notification settings - Fork 146
Promatically swipe cards #49
Comments
I believe this broke when using beta 14 |
Do you know around which commit that was. I want to take a look at the code |
ionic beta14 release. The example in this library moved the CardCtrl to a div below to resolve a problem with multiple scopes. When I tried this, it was very buggy and unusable. I changed my implementation to place the remove the CardCtrl and move the functions to my view controller instead. In doing so, I lost the ability to use the TDCardDelegate.getSwipeableCard. |
The code behind this issue is quite confusing. I am not sure where the disconnect between the swipecard project and this one is. It seems like a bunch of methods to obtain this that could be quite useful have been removed or do not work. Such as popCard, swipeRight, swipeLeft and of course the ability to get the swipeableCard is much different. Is there a reason behind this? |
I'm interested in this too. |
@mlynch @steveacalabro Max would have to answer that question. I am merely a user and contributor to the libraries. |
I think I might have a fix to this problem. It changes up the td directive and how you call it a bit though. I am testing it now |
Any updates on this issue? Was anyone able to get it working? |
+1 for a solution to this problem :) |
+1 |
1 similar comment
+1 |
Any updates on this issue? Thanks! |
When I do a
I receive the following error
It seems that swipe method calls transitionOut that receives an Event parameter (In that case, undefined) |
I've been working on getting this to work for my current project. I'm not sure at all this was the best or the "Angular" way to do it, but it's working nicely. I've noticed some issues with sorting the cards when pushing new ones, sometimes causing a swipe of the one that is not on top. In my case it's not an issue since the deck I show is fixed, but tell me if you know the cause of this issue. |
@grillorafael Yes, I had the same issue and needed to update transitionOut() to do manual swipes without an Event. |
+1 For a usable solution as well. |
@julienroubieu I've tested your solution and it worked very well. |
I made a version with handle and programatic swipe that return promises: https://github.com/Bixev/ionic-ion-tinder-cards
Adding delegate-handle to have several instances
Get the card on top
Get any card
Promatically swipe left (return a promise)
With a promise you could for example disabled buttons when a card is swipping.
I did not put too much effort, and it is not fully tested but it works so far. Feel free to get some of the code it you feel there is interesting stuff to keep. Cheers |
@shprink , I tried your solution. It works great on web page but When I try it on Android phone It throws error on this line ,
This is the error,
|
@shprink this is brilliant! Thanks so much. |
@paul-ylz do not get too excited, this was just for fun and it is not maintained :) Feel free to fork and go further |
How are people currently doing this? I cannot get @julienroubieu example working (and ideally I just need some custom directive . As @shprink isn't maintaining his folk- would love another simple solution. Thx |
@shprink can this work with ionic 2 and angular 2, thanks |
probably not |
This used to be a feature with the swipe cards but it has seemed to be moved from this version of it. Example used to be this code
var card = TDCardDelegate.getSwipeableCard($scope);
card.swipe();
Does not seem to work anymore from what I can see? Any suggestions
The text was updated successfully, but these errors were encountered: