-
Notifications
You must be signed in to change notification settings - Fork 52
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
Added btf-eliminate #6
base: master
Are you sure you want to change the base?
Conversation
… if it is dropped outside of a dragon.
thanks for the PR. I'll try to take a look at it later. :) |
… btf-dragon-delay which defaults to zero, but when it's not zero it requires that amount of time to be waited before the element is picked up. This was added because I wanted to make the element clickable.
This new commit is for the specific need I have, and I'm not sure if I'm doing things the angular way or how useful it'd be for other people. It just makes it so that there's a delay when you click on it. I'm not even sure why it showed up here, sorry about that. |
I think that the eliminate behavior is very useful. I even made it the default behavior in my project. i.e. instead of : elt.bind('mousedown', function (ev) {
if (dragValue) {
return;
}
mouseReleased = false;
setTimeout(function(){
... dragging commands
},delay);
}); do something like: elt.bind('mousedown', function (ev) {
mouseReleased = false;
});
elt.bind('mousemove', function (ev) {
if(dragValue||mouseReleased) {
return;
}
... dragging commands
}); |
… an element is dragged it is picked up.
Thanks for the suggestion, I added it as you suggested. It works a lot better and it feels a lot more fluid now! |
Not using array notation breaks minification
Added btf-eliminate Conflicts: dragon-drop.js
btf-eliminate makes it so that the element is eliminated if it is dropped outside of a dragon.