refactor code

This commit is contained in:
Ryan Di
2023-12-01 17:43:01 +08:00
parent a7154227cf
commit d1a9c593cc
5 changed files with 128 additions and 125 deletions

View File

@@ -11,7 +11,7 @@ import { getSelectedElements } from "./selection";
import { AppState } from "../types";
import { Assert, SameType } from "../utility-types";
import { randomInteger } from "../random";
import { normalizeFractionalIndexing } from "../zindex";
import { normalizeFractionalIndicies } from "../fractionalIndex";
type ElementIdKey = InstanceType<typeof LinearElementEditor>["elementId"];
type ElementKey = ExcalidrawElement | ElementIdKey;
@@ -232,7 +232,7 @@ class Scene {
nextElements: readonly ExcalidrawElement[],
mapElementIds = true,
) {
const _nextElements = normalizeFractionalIndexing(nextElements);
const _nextElements = normalizeFractionalIndicies(nextElements);
this.elements = _nextElements;
const nextFrameLikes: ExcalidrawFrameLikeElement[] = [];