capture history
This commit is contained in:
parent
f0c1e9707a
commit
09e249ae57
@ -546,7 +546,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
public library: AppClassProperties["library"];
|
public library: AppClassProperties["library"];
|
||||||
public libraryItemsFromStorage: LibraryItems | undefined;
|
public libraryItemsFromStorage: LibraryItems | undefined;
|
||||||
public id: string;
|
public id: string;
|
||||||
private store: Store;
|
store: Store;
|
||||||
private history: History;
|
private history: History;
|
||||||
private excalidrawContainerValue: {
|
private excalidrawContainerValue: {
|
||||||
container: HTMLDivElement | null;
|
container: HTMLDivElement | null;
|
||||||
|
@ -7,6 +7,7 @@ import { deepCopyElement } from "../../element/newElement";
|
|||||||
|
|
||||||
import "./DragInput.scss";
|
import "./DragInput.scss";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
import { useApp } from "../App";
|
||||||
|
|
||||||
export type DragInputCallbackType = (
|
export type DragInputCallbackType = (
|
||||||
accumulatedChange: number,
|
accumulatedChange: number,
|
||||||
@ -34,6 +35,7 @@ const StatsDragInput = ({
|
|||||||
editable = true,
|
editable = true,
|
||||||
shouldKeepAspectRatio,
|
shouldKeepAspectRatio,
|
||||||
}: StatsDragInputProps) => {
|
}: StatsDragInputProps) => {
|
||||||
|
const app = useApp();
|
||||||
const inputRef = useRef<HTMLInputElement>(null);
|
const inputRef = useRef<HTMLInputElement>(null);
|
||||||
const labelRef = useRef<HTMLDivElement>(null);
|
const labelRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
@ -110,6 +112,8 @@ const StatsDragInput = ({
|
|||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
app.store.shouldCaptureIncrement();
|
||||||
|
|
||||||
lastPointer = null;
|
lastPointer = null;
|
||||||
accumulatedChange = null;
|
accumulatedChange = null;
|
||||||
stateAtStart = null;
|
stateAtStart = null;
|
||||||
@ -153,6 +157,7 @@ const StatsDragInput = ({
|
|||||||
false,
|
false,
|
||||||
v,
|
v,
|
||||||
);
|
);
|
||||||
|
app.store.shouldCaptureIncrement();
|
||||||
eventTarget.blur();
|
eventTarget.blur();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -592,6 +592,7 @@ export type AppClassProperties = {
|
|||||||
files: BinaryFiles;
|
files: BinaryFiles;
|
||||||
device: App["device"];
|
device: App["device"];
|
||||||
scene: App["scene"];
|
scene: App["scene"];
|
||||||
|
store: App["store"];
|
||||||
pasteFromClipboard: App["pasteFromClipboard"];
|
pasteFromClipboard: App["pasteFromClipboard"];
|
||||||
id: App["id"];
|
id: App["id"];
|
||||||
onInsertElements: App["onInsertElements"];
|
onInsertElements: App["onInsertElements"];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user