Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Fixes issue #63 - Reordering items not working correctly #126

Conversation

pmsandhu
Copy link
Contributor

Fixes issue #63. This main bug is caused when the target of the groupDrag event is the group.dom.inner element since the group.setData method is called which removes the group.dom.inner element completely and thus the reference to the drag element is lost and the group stops dragging.

  • This pr fixes this by returning from the group.setData method if there is a group being dragged.
  • It also adds the className timeline-group-is-dragging to the group.dom.label and group.dom.foreground elements of the dragged group while it is being dragged and removes it on the drag end event.
  • You can test the groupsEditable.html example to confirm that the bug is fixed.

PS. Lines 1919-1973 in the _onGroupDrag method and lines 1996-2034 in _onGroupDragEnd method of ItemSet.js dont appear to do anything.

Copy link
Owner

@yotamberk yotamberk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Thank you very much!
About your comment about the lines that don;t seem to do anything, to be honest I'm not sure exactly what those lines were in charge of. I'll look in to it in the future.
Nice work again!

@yotamberk yotamberk merged commit f7f0047 into yotamberk:develop Feb 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants