aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentButtonBar.tsx
diff options
context:
space:
mode:
authoreleanor-park <eleanor_park@brown.edu>2024-07-23 12:07:53 -0400
committereleanor-park <eleanor_park@brown.edu>2024-07-23 12:07:53 -0400
commit3e1ef3d0b5445065ab3f44ffc17bbb04efaa8c8a (patch)
tree54060710007bb52986e86efba0162ffef9142229 /src/client/views/DocumentButtonBar.tsx
parentdb1462bb2ea327a98ca239080e88944425aba768 (diff)
merging w/ zach's branch
Diffstat (limited to 'src/client/views/DocumentButtonBar.tsx')
-rw-r--r--src/client/views/DocumentButtonBar.tsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx
index 177546fdc..eb0b00472 100644
--- a/src/client/views/DocumentButtonBar.tsx
+++ b/src/client/views/DocumentButtonBar.tsx
@@ -244,12 +244,14 @@ export class DocumentButtonBar extends ObservableReactComponent<{ views: () => (
}
@observable _annoSaved: boolean = false;
- @action
- saveAnno = (targetDoc: Doc) => {
- targetDoc.savedAsAnno = true;
+
+ @undoBatch
+ saveAnno = action((targetDoc: Doc) => {
+ // targetDoc.savedAsAnno = true;
this._annoSaved = true;
- AnnotationPalette.Instance.saveAnno(this.view0, targetDoc);
- };
+ AnnotationPalette.Instance.addToPalette(targetDoc);
+ });
+
@computed
get saveAnnoButton() {
const targetDoc = this.view0?.Document;