…lines 1–9 unchanged (9 lines)
10import type {
11 ElementsMap,
12 ExcalidrawElement,
13 NonDeletedSceneElementsMap,
14} from "../../element/types";
15import type Scene from "../../scene/Scene";
16import type { AppState } from "../../types";
17import DragInput from "./DragInput";
18import type { DragInputCallbackType } from "./DragInput";
19import { getAtomicUnits, getStepSizedValue, isPropertyEditable } from "./utils";
20import { getElementsInAtomicUnit, resizeElement } from "./utils";
21import type { AtomicUnit } from "./utils";
22import { MIN_WIDTH_OR_HEIGHT } from "../../constants";
23import { point, type GlobalPoint } from "../../../math";
24
25interface MultiDimensionProps {
26 property: "width" | "height";
27 elements: readonly ExcalidrawElement[];
28 elementsMap: NonDeletedSceneElementsMap;
29 atomicUnits: AtomicUnit[];
…lines 30–101 unchanged (72 lines)
102
103const resizeGroup = (
104 nextWidth: number,
105 nextHeight: number,
106 initialHeight: number,
107 aspectRatio: number,
108 anchor: GlobalPoint,
109 property: MultiDimensionProps["property"],
110 latestElements: ExcalidrawElement[],
111 originalElements: ExcalidrawElement[],
112 elementsMap: NonDeletedSceneElementsMap,
113 originalElementsMap: ElementsMap,
114) => {
…lines 115–178 unchanged (64 lines)
179
180 resizeGroup(
181 nextWidth,
182 nextHeight,
183 initialHeight,
184 aspectRatio,
185 point(x1, y1),
186 property,
187 latestElements,
188 originalElements,
189 elementsMap,
190 originalElementsMap,
191 );
…lines 192–283 unchanged (92 lines)
284
285 resizeGroup(
286 nextWidth,
287 nextHeight,
288 initialHeight,
289 aspectRatio,
290 point(x1, y1),
291 property,
292 latestElements,
293 originalElements,
294 elementsMap,
295 originalElementsMap,
296 );
…lines 297–396 unchanged (100 lines)