mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix group element removing (#1676)
This commit is contained in:
parent
17e9cc4506
commit
f413bab3de
11 changed files with 478 additions and 43 deletions
|
@ -12,6 +12,7 @@ import { measureText, getFontString } from "../utils";
|
|||
import { randomInteger, randomId } from "../random";
|
||||
import { newElementWith } from "./mutateElement";
|
||||
import { getNewGroupIdsForDuplication } from "../groups";
|
||||
import { AppState } from "../types";
|
||||
|
||||
type ElementConstructorOpts = {
|
||||
x: ExcalidrawGenericElement["x"];
|
||||
|
@ -169,7 +170,7 @@ export const deepCopyElement = (val: any, depth: number = 0) => {
|
|||
* @param overrides Any element properties to override
|
||||
*/
|
||||
export const duplicateElement = <TElement extends Mutable<ExcalidrawElement>>(
|
||||
editingGroupId: GroupId | null,
|
||||
editingGroupId: AppState["editingGroupId"],
|
||||
groupIdMapForOperation: Map<GroupId, GroupId>,
|
||||
element: TElement,
|
||||
overrides?: Partial<TElement>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue