You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Not a bug....
Currently, drag can be limited by the onDrag callback returning false.
On weakly performing devices and/or quickly done drag interactions, this may result in inconvenient user experience, because drag is stopping before an intended limit.
To Reproduce
Limit drag within the callback, switch on CPU throttling and/or do a swift drag of a datapoint.
Expected behavior
Regardless, how fast the drag is made, the dragged point shall align to the intended limit, if pointer is moved beyond that limit
Proposed Change
Allow the onDrag callback to return not just false, but optionally a datapoint. A little like your magnet.to function. But the magnet is applied too late for my purpose
Just a quick sample code snippet, how I would like to see it
At the end of updataData:
Could also be restricted to the onDrag callback, but I suppose that needs more code changes, since you do not distinguish between the different configurable callbacks. But using this for endDrag as well, could make the magnet.to obsolete
If this sounds feasible for you, I could issue a PR.
The text was updated successfully, but these errors were encountered:
I wanted to review #86 done by @artus9033, who did a great job improving the code quality of this project together with the added benefit of type annotations. Maybe you can have a look as well and probably issue the PR as a follow up of the code-cleanup?
Another thing I have to get done before accepting PRs is finishing the test cases. The possible combinations of options the plugin provides today by far exceed what I originally intended, so I think we might even want to consider unit tests...
Describe the bug
Not a bug....
Currently, drag can be limited by the onDrag callback returning false.
On weakly performing devices and/or quickly done drag interactions, this may result in inconvenient user experience, because drag is stopping before an intended limit.
To Reproduce
Limit drag within the callback, switch on CPU throttling and/or do a swift drag of a datapoint.
Expected behavior
Regardless, how fast the drag is made, the dragged point shall align to the intended limit, if pointer is moved beyond that limit
Proposed Change
Allow the onDrag callback to return not just false, but optionally a datapoint. A little like your magnet.to function. But the magnet is applied too late for my purpose
Just a quick sample code snippet, how I would like to see it
At the end of updataData:
Could also be restricted to the onDrag callback, but I suppose that needs more code changes, since you do not distinguish between the different configurable callbacks. But using this for endDrag as well, could make the magnet.to obsolete
If this sounds feasible for you, I could issue a PR.
The text was updated successfully, but these errors were encountered: