aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-04-13 00:31:14 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-04-13 00:31:14 -0400
commited9bb54c6307e809c6c6aa40c7d77cd3480e7e73 (patch)
treec70e37a2dd8a4b4fbb4beea48f55094f5cc01b5e /src
parent0737a14e2c436ab9613c638bcebdc5480df1d4d4 (diff)
added some undo's
Diffstat (limited to 'src')
-rw-r--r--src/client/views/DocumentDecorations.tsx3
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index c172e870e..2dc496bc1 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -17,6 +17,8 @@ import React = require("react");
import { FieldWaiting } from "../../fields/Field";
import { emptyFunction } from "../../Utils";
import { Main } from "./Main";
+import { undo } from "prosemirror-history";
+import { undoBatch } from "../util/UndoManager";
const higflyout = require("@hig/flyout");
export const { anchorPoints } = higflyout;
export const Flyout = higflyout.default;
@@ -156,6 +158,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
if (e.button === 0) {
}
}
+ @undoBatch
@action
onCloseUp = (e: PointerEvent): void => {
e.stopPropagation();
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index 9c0d75c22..ccc2fcf0c 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -12,6 +12,8 @@ import { PreviewCursor } from "../../PreviewCursor";
import { CollectionFreeFormView } from "./CollectionFreeFormView";
import "./MarqueeView.scss";
import React = require("react");
+import { undo } from "prosemirror-history";
+import { undoBatch } from "../../../util/UndoManager";
interface MarqueeViewProps {
getContainerTransform: () => Transform;
@@ -128,6 +130,7 @@ export class MarqueeView extends React.Component<MarqueeViewProps>
return { left: topLeft[0], top: topLeft[1], width: Math.abs(size[0]), height: Math.abs(size[1]) };
}
+ @undoBatch
@action
marqueeCommand = (e: KeyboardEvent) => {
if (e.key === "Backspace" || e.key === "Delete") {