-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't throw out cards on iPhone #3
Comments
I got the same problem |
i am also having the same problem, i am trying to config throwOutConfidence to be 0.5 but cant seem to do it using the configuration method in the swig documentation. Any help is much apreciated. var stack,
config;
config = {
/**
* Invoked in the event of dragmove.
* Returns a value between 0 and 1 indicating the completeness of the throw out condition.
* Ration of the absolute distance from the original card position and element width.
*
* @param {Number} offset Distance from the dragStart.
* @param {HTMLElement} element Element.
* @return {Number}
*/
throwOutConfidence: function (offset, element) {
return Math.min(Math.abs(offset) / element.offsetWidth, 1);
}
};
stack = stack = Swing.Stack(config); |
Try setting throwOutConfidence as this - return Math.min(Math.abs(offset) / (element.offsetWidth / 2), 1); |
Thank you @m10l |
Also noticing this on mobile. |
did anyone get this working updating the config variables from within Angular? |
@jshultz I had to fork this directive and change it to suit my needs. Sadly there is no option to pass in configuration into the directive. |
@tobiasmuecksch : good to know, thank you. I guess I'm doing the same thing then. :) |
So, what is the best option to solve this? When I test it in normal view in chrome, I do get the bumping back and dnd effect, and with the solution @m10l `` |
In Vuejs in the config data i defined the following: config: {
|
I'm using angular swing in an ionic app. It works perfectly so far. But currently I have the issue that I can't throw out cards in any direction. They just snap back. I only can throw cards out, if I touch them on the outmost edge in the opposite direction of which I'm throwing.
Is it possible to set a minimum distance a card has to be dragged to count as thrown out?
I hope I expressed my problem correctly :)
Thanks in advance!
The text was updated successfully, but these errors were encountered: