mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-21 13:14:25 +01:00
indices with jitter
This commit is contained in:
@@ -11,7 +11,10 @@ import { getSelectedElements } from "./selection";
|
||||
import { AppState } from "../types";
|
||||
import { Assert, SameType } from "../utility-types";
|
||||
import { randomInteger } from "../random";
|
||||
import { fixFractionalIndices } from "../fractionalIndex";
|
||||
import {
|
||||
fixFractionalIndices,
|
||||
validateFractionalIndicies,
|
||||
} from "../fractionalIndex";
|
||||
import { arrayToMap } from "../utils";
|
||||
|
||||
type ElementIdKey = InstanceType<typeof LinearElementEditor>["elementId"];
|
||||
@@ -240,6 +243,12 @@ class Scene {
|
||||
_nextElements = nextElements;
|
||||
}
|
||||
|
||||
if (import.meta.env.DEV) {
|
||||
if (!validateFractionalIndicies(_nextElements)) {
|
||||
console.error("fractional indices consistency has been compromised");
|
||||
}
|
||||
}
|
||||
|
||||
this.elements = _nextElements;
|
||||
const nextFrameLikes: ExcalidrawFrameLikeElement[] = [];
|
||||
this.elementsMap.clear();
|
||||
|
||||
Reference in New Issue
Block a user