|
@@ -55,6 +55,7 @@ BlazeComponent.extendComponent({
|
|
const nCards = MultiSelection.isActive() ? MultiSelection.count() : 1;
|
|
const nCards = MultiSelection.isActive() ? MultiSelection.count() : 1;
|
|
const sortIndex = calculateIndex(prevCardDom, nextCardDom, nCards);
|
|
const sortIndex = calculateIndex(prevCardDom, nextCardDom, nCards);
|
|
const listId = Blaze.getData(ui.item.parents('.list').get(0))._id;
|
|
const listId = Blaze.getData(ui.item.parents('.list').get(0))._id;
|
|
|
|
+ const swimlaneId = Blaze.getData(ui.item.parents('.swimlane').get(0))._id;
|
|
|
|
|
|
// Normally the jquery-ui sortable library moves the dragged DOM element
|
|
// Normally the jquery-ui sortable library moves the dragged DOM element
|
|
// to its new position, which disrupts Blaze reactive updates mechanism
|
|
// to its new position, which disrupts Blaze reactive updates mechanism
|
|
@@ -67,12 +68,12 @@ BlazeComponent.extendComponent({
|
|
|
|
|
|
if (MultiSelection.isActive()) {
|
|
if (MultiSelection.isActive()) {
|
|
Cards.find(MultiSelection.getMongoSelector()).forEach((card, i) => {
|
|
Cards.find(MultiSelection.getMongoSelector()).forEach((card, i) => {
|
|
- card.move(listId, sortIndex.base + i * sortIndex.increment);
|
|
|
|
|
|
+ card.move(swimlaneId, listId, sortIndex.base + i * sortIndex.increment);
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
const cardDomElement = ui.item.get(0);
|
|
const cardDomElement = ui.item.get(0);
|
|
const card = Blaze.getData(cardDomElement);
|
|
const card = Blaze.getData(cardDomElement);
|
|
- card.move(listId, sortIndex.base);
|
|
|
|
|
|
+ card.move(swimlaneId, listId, sortIndex.base);
|
|
}
|
|
}
|
|
boardComponent.setIsDragging(false);
|
|
boardComponent.setIsDragging(false);
|
|
},
|
|
},
|