mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-12-04 11:34:44 +01:00
fix fractional indices on adding new elements
This commit is contained in:
@@ -235,9 +235,9 @@ const getTargetElementsMap = <T extends ExcalidrawElement>(
|
||||
) => {
|
||||
return indices.reduce((acc, index) => {
|
||||
const element = elements[index];
|
||||
acc[element.id] = element;
|
||||
acc.set(element.id, element);
|
||||
return acc;
|
||||
}, {} as Record<string, ExcalidrawElement>);
|
||||
}, new Map<string, ExcalidrawElement>());
|
||||
};
|
||||
|
||||
const shiftElementsByOne = (
|
||||
|
||||
Reference in New Issue
Block a user