Maybe fix group alt+drag

This commit is contained in:
Mark Tolmacs 2025-03-19 20:52:07 +01:00
parent d1b0aa63c4
commit d50173f4fa

View file

@ -245,9 +245,13 @@ export const duplicateElements = (
: [element],
);
const targetIndex = findLastIndex(elementsWithClones, (el) => {
return el.groupIds?.includes(groupId);
});
const targetIndex = opts?.reverseOrder
? elementsWithClones.findIndex((el) => {
return el.groupIds?.includes(groupId);
})
: findLastIndex(elementsWithClones, (el) => {
return el.groupIds?.includes(groupId);
});
insertBeforeOrAfterIndex(targetIndex, copyElements(groupElements));
continue;