mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Tests for groups, more test utils (#1669)
This commit is contained in:
parent
4f3bf79708
commit
56f8bc092d
4 changed files with 3300 additions and 302 deletions
|
@ -11,7 +11,6 @@ import {
|
|||
import { measureText, getFontString } from "../utils";
|
||||
import { randomInteger, randomId } from "../random";
|
||||
import { newElementWith } from "./mutateElement";
|
||||
import nanoid from "nanoid";
|
||||
import { getNewGroupIdsForDuplication } from "../groups";
|
||||
|
||||
type ElementConstructorOpts = {
|
||||
|
@ -183,7 +182,7 @@ export const duplicateElement = <TElement extends Mutable<ExcalidrawElement>>(
|
|||
editingGroupId,
|
||||
(groupId) => {
|
||||
if (!groupIdMapForOperation.has(groupId)) {
|
||||
groupIdMapForOperation.set(groupId, nanoid());
|
||||
groupIdMapForOperation.set(groupId, randomId());
|
||||
}
|
||||
return groupIdMapForOperation.get(groupId)!;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue