-
-
Notifications
You must be signed in to change notification settings - Fork 459
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
Dragleave #540
Dragleave #540
Conversation
makes sure original target is sent with the sortenter and sortstart event;
…ainer; fires sortenter when a dragitem enters a container; fires dragleave when a dragitem leaves a container.
src/html5sortable.ts
Outdated
@@ -364,11 +380,33 @@ export default function sortable (sortableElements, options: configuration|objec | |||
originalTarget: target | |||
} | |||
})) | |||
|
|||
_on(sortableContainer, 'dragleave', e => { | |||
const outTarget = e.releatedTarget || e.fromElement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is outTarget
? Can we rename this to make it more clear?
Hey @christophe-g, I love this PR, a really great addition to the package. I left a couple comments. Additionally could you please add some tests to cover the new "uncovered/untested" lines? https://coveralls.io/builds/31215801/source?filename=src%2Fhtml5sortable.ts#L368 This is really important so that we can make sure future additions will not break this part of the package. Thank you. 👍 |
Thanks a lot for the answer @lukasoppermann Agreed on the comments - will hopefully have some time next week to add tests (and integrate your remarks). |
Great, thank you very much. Looking forward to merge it afterwards. 👍 |
Hey @christophe-g did you have time to work on this. I would love to merge it once it is updated. 👍 |
Hey @kaffarell do you think you can get this one patched up so that we can merge it? The way I understand it, it could be a nice addition to the package. |
👍 Ok, will try later today... |
@lukasoppermann I resolved the first two of your comments but I really don't get what @christophe-g meant with |
Hey @kaffarell did you also already write some tests for this new update? |
Trying to fix package-lock
Hey @kaffarell, |
Sorry for the late reply, had a lot to do in the recent weeks. I fixed the typo and added the comments But unfortunately I was not able to write the tests. |
Okay, no worries. Did you manually test it though? |
Tested it manually now and it is working... |
Added containerClass, a css class added when dragitem hover on a container; fires sortenter when a dragitem enters a container; fires dragleave when a dragitem leaves a container.