Skip to content
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

feat: show a shadow element of the row being moved/dragged #651

Merged
merged 8 commits into from
Oct 21, 2021

Conversation

ghiscoding
Copy link
Collaborator

@ghiscoding ghiscoding commented Oct 21, 2021

  • add option to create a simple clone of the row being moved and show it as a shadow (cloned element) of the row being moved so that we know exactly which row is being dragged (it follow the mouse cursor and once we stop moving it gets destroyed)
  • also add options to change this shadow element opacity & scale size
  • it's a simple feature but is very helpful to not lose track of exactly which row we're dragging

Y8rF0Vd4Iz

- add option to create a simple clone of the row being moved and show it as a shadow of the row being moved so that we know exactly which row is being dragged
@ghiscoding ghiscoding changed the title feat: show shadow element of row being moved feat: show a shadow element of the row being moved (dragged) Oct 21, 2021
@ghiscoding ghiscoding changed the title feat: show a shadow element of the row being moved (dragged) feat: show a shadow element of the row being moved/dragged Oct 21, 2021
@ghiscoding ghiscoding requested a review from 6pac October 21, 2021 04:12
@6pac
Copy link
Owner

6pac commented Oct 21, 2021

Looks good to me. Nice little feature ...

@ghiscoding
Copy link
Collaborator Author

ghiscoding commented Oct 21, 2021

@6pac thanks, I'm done with it, so feel free to merge

EDIT
actually wait, I found an issue when the grid is scrolled then its position is wrong. Trying to fix that now

@ghiscoding ghiscoding changed the title feat: show a shadow element of the row being moved/dragged WIP - feat: show a shadow element of the row being moved/dragged Oct 21, 2021
@ghiscoding ghiscoding changed the title WIP - feat: show a shadow element of the row being moved/dragged feat: show a shadow element of the row being moved/dragged Oct 21, 2021
@ghiscoding
Copy link
Collaborator Author

@6pac
alright I'm done, tested with our project and everything is fine now and also fixed any potential leak by removing this new event when destroying the plugin. It's all good now... go ahead with merge (better use "Squash & Merge" button).
Thanks mate

- when starting the row drag at first it always starts at 0px and then jumps at the position the user started the drag so it looks like it jumps from 0px to let 50px if you move 2nd row and it's a bit annoying (it's like a flicker for half a second). We can simply create the proxy/guide/shadow as hidden and only show it after we move so we won't see the first flicker.
@6pac 6pac merged commit c6cfe18 into master Oct 21, 2021
@ghiscoding ghiscoding deleted the feat/row-move-shadow branch April 30, 2022 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants