diff options
author | eleanor-park <eleanor_park@brown.edu> | 2024-07-23 12:07:53 -0400 |
---|---|---|
committer | eleanor-park <eleanor_park@brown.edu> | 2024-07-23 12:07:53 -0400 |
commit | 3e1ef3d0b5445065ab3f44ffc17bbb04efaa8c8a (patch) | |
tree | 54060710007bb52986e86efba0162ffef9142229 /src/client/views/DocumentButtonBar.tsx | |
parent | db1462bb2ea327a98ca239080e88944425aba768 (diff) |
merging w/ zach's branch
Diffstat (limited to 'src/client/views/DocumentButtonBar.tsx')
-rw-r--r-- | src/client/views/DocumentButtonBar.tsx | 12 |
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; |