-
Notifications
You must be signed in to change notification settings - Fork 369
animated dragging - dragged TR element actually follows the mouse #78
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks @jitbit, can you let me know how this works on tablets? I've not got the time to test it myself. Also, does the page scrolling for long tables still work? :) |
|
@brendon Yes, I kept the autoscroll code intact. It works, I tested it on long tables Tablets: I tested on an iPhone/iOS 10, it works fine, but can't find a tablet to test with... Anyways, most tablets are WebKit anyway, so it should work. Once again - it simply sets |
|
Ah I see :) Is there some kind of visual indicator as to where the drop will affect (i.e. a bold line between the two rows of the table that the tr will drop into?) |
|
Nope, not yet. It only does what I said it does :) sets the "style". |
|
I suggest you try it in a browser and decide if its worth the merge :) If not - it's fine, I'll continue working on it anyway (including the drop indicator) |
|
I think once it has a drop indicator we can merge it. That would mean that we're not removing a feature (currently as the tr is moved we get that indication purely because it's actually moved up or down the table.) Whether it's done by inserting a dummy row into the table, or just manipulating the border width (I'd favour the first since it's easier to style (and override)). Please excuse my hesitant nature around this PR. I've only recently been appointed to the project as a maintainer :) |
|
Got it :) No worries. I'll keep working and get back to you |
It's only 10 lines of code. Here's what I did:
mousemoveit only moves the dragged element along with the mouse usingcss - transformand it does not perform the actualmoveVerticallyto move the element in the DOM.Tested in Chrome, Mozilla, Edge. Also, css-transform is supported in all major browsers including even IE11.
Performance should be ok, b/c transform is h/w accelerated (unlike
css top/leftmanipulations). Tested on my wife's slow laptop :)