Commit bedaccc3 authored by Florie Guibert's avatar Florie Guibert

Fix D&D issue in swimlanes within the same list/epic

parent 6d2092a7
...@@ -131,10 +131,10 @@ export default { ...@@ -131,10 +131,10 @@ export default {
if (from === to) { if (from === to) {
if (newIndex > oldIndex && children.length > 1) { if (newIndex > oldIndex && children.length > 1) {
// If issue is being moved down we look for the issue that ends up before // If issue is being moved down we look for the issue that ends up before
moveBeforeId = Number(children[newIndex].dataset.itemId); moveBeforeId = children[newIndex].dataset.itemId;
} else if (newIndex < oldIndex && children.length > 1) { } else if (newIndex < oldIndex && children.length > 1) {
// If issue is being moved up we look for the issue that ends up after // If issue is being moved up we look for the issue that ends up after
moveAfterId = Number(children[newIndex].dataset.itemId); moveAfterId = children[newIndex].dataset.itemId;
} else { } else {
// If issue remains in the same list at the same position we do nothing // If issue remains in the same list at the same position we do nothing
return; return;
...@@ -142,11 +142,11 @@ export default { ...@@ -142,11 +142,11 @@ export default {
} else { } else {
// We look for the issue that ends up before the moved issue if it exists // We look for the issue that ends up before the moved issue if it exists
if (children[newIndex - 1]) { if (children[newIndex - 1]) {
moveBeforeId = Number(children[newIndex - 1].dataset.itemId); moveBeforeId = children[newIndex - 1].dataset.itemId;
} }
// We look for the issue that ends up after the moved issue if it exists // We look for the issue that ends up after the moved issue if it exists
if (children[newIndex]) { if (children[newIndex]) {
moveAfterId = Number(children[newIndex].dataset.itemId); moveAfterId = children[newIndex].dataset.itemId;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment