capture history

editable-element-stats
Ryan Di 9 months ago
parent f0c1e9707a
commit 09e249ae57

@ -546,7 +546,7 @@ class App extends React.Component<AppProps, AppState> {
public library: AppClassProperties["library"];
public libraryItemsFromStorage: LibraryItems | undefined;
public id: string;
private store: Store;
store: Store;
private history: History;
private excalidrawContainerValue: {
container: HTMLDivElement | null;

@ -7,6 +7,7 @@ import { deepCopyElement } from "../../element/newElement";
import "./DragInput.scss";
import clsx from "clsx";
import { useApp } from "../App";
export type DragInputCallbackType = (
accumulatedChange: number,
@ -34,6 +35,7 @@ const StatsDragInput = ({
editable = true,
shouldKeepAspectRatio,
}: StatsDragInputProps) => {
const app = useApp();
const inputRef = useRef<HTMLInputElement>(null);
const labelRef = useRef<HTMLDivElement>(null);
@ -110,6 +112,8 @@ const StatsDragInput = ({
false,
);
app.store.shouldCaptureIncrement();
lastPointer = null;
accumulatedChange = null;
stateAtStart = null;
@ -153,6 +157,7 @@ const StatsDragInput = ({
false,
v,
);
app.store.shouldCaptureIncrement();
eventTarget.blur();
}
}

@ -592,6 +592,7 @@ export type AppClassProperties = {
files: BinaryFiles;
device: App["device"];
scene: App["scene"];
store: App["store"];
pasteFromClipboard: App["pasteFromClipboard"];
id: App["id"];
onInsertElements: App["onInsertElements"];

Loading…
Cancel
Save