-
Notifications
You must be signed in to change notification settings - Fork 29
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
onDestroy should stop auto scroll immediately. #24
Comments
Sorry I'm confused. The destroy method is meant for a total clean up when you want to throw away the auto scroll functionality, or the main element is removed/deleted. Are you thinking of a simple "stopping" of the scrolling, or something else? To temporarilly stop autoscrolling you can save a boolean ESC state variable, and return from the |
Hi @hollowdoor we can call destroy to total clean up Autoscroller, but it's still scrolling until I raise mouseup event. The reason is because the
so I think it should call this function to clean up. |
Ok. I see now. You want the next loop canceled. Though the destroy method will do more than just cancel even if that functionality is added. In the fiddle you provide dragula dragging effect is still available after cancel. Are you sure you want this scroll stopping effect in Though I think this issue has brought to my attention a bug in destroy. So I thank you for that. I think I will create a Also I just realized dragula is still dragging in the fiddle after cancel. Only the drop is canceled. Is this the effect you wanted to show me? |
How do you know Dragula still dragging? I have checked That's would be great that we can fix the |
I don't know if Dragula is dragging. I should say the behavior in that fiddle is that visually it's still dragging. Sorry. If you would like to make a pull request that would be great. |
I just realized this could be a breaking change, or at least a surprising behavior for some. @sangcu If you go through with the PR could you add a boolean switch to |
Hi @hollowdoor I understand the changes would make breaking changes in the code. However, the so if you agreed, I would add a parameter to this function as your suggested for the time being. Based on that, we can increase the version number as semver to add one more function to |
I also think that a boolean switch isn't appropriate in the long term. I'm just troubled by making the change in a minor version while maybe people might be using the bug as a feature. I also see that you, and possibly others might want this corrected in the present. As I would. A temporary boolean switch will have to do for now. When enough new breaking ideas are collected for a major version we can remove the boolean switch when those other ideas are implemented. The
Take your time. We can start worrying if a bunch of other people start adding plus ones to this issue. :) |
#24 support parameter in destroy method to force clean up animation
I'm closing this for now. I'll create a new issue for version 3 that will include removal of the boolean switch added to fix this. |
There is the case when a user drags an item, then, press ESC to cancel drag event. In this case, we should stop auto-scroll immediately in destroy method instead of waiting for mouseup event to be dispatched.
@hollowdoor: what do you think about this?
The text was updated successfully, but these errors were encountered: