feat: add element.updated (#4070)

This commit is contained in:
David Luzar 2021-11-24 18:38:33 +01:00 committed by GitHub
parent dac970c640
commit f9d2d537a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 500 additions and 4 deletions

View file

@ -26,6 +26,7 @@ import {
import { getDefaultAppState } from "../appState";
import { LinearElementEditor } from "../element/linearElementEditor";
import { bumpVersion } from "../element/mutateElement";
import { getUpdatedTimestamp } from "../utils";
type RestoredAppState = Omit<
AppState,
@ -101,6 +102,7 @@ const restoreElementWithProperties = <
element.strokeSharpness ??
(isLinearElementType(element.type) ? "round" : "sharp"),
boundElementIds: element.boundElementIds ?? [],
updated: element.updated ?? getUpdatedTimestamp(),
};
return {