Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Track undo/redo events. (#4735) (#4761)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba authored and jaredhirsch committed Aug 13, 2018
1 parent d2b684d commit 1257f22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/METRICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,11 @@ The hashed page ID (`{hash}`) is a simple SHA1(path), with no additional randomn
9. [x] Select a color from the color board: `web/{color}-select/annotation-color-board`
7. [x] Use pen tool: `web/draw/pen`
8. [x] Use highlight tool: `web/draw/highlight`
1. [x] Undo edit: `web/undo/annotation-toolbar`
1. [x] Redo edit: `web/redo/annotation-toolbar`
1. [x] Select text tool from annotation toolbar: `web/text-select/annotation-toolbar`
1. [x] Confirm text edit: `web/confirm-text/text-toolbar`
1. [x] Cancel text edit: `web/cancel-text/text-toolbar`


#### General Google Analytics information
Expand Down
2 changes: 2 additions & 0 deletions server/src/pages/shot/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ exports.Editor = class Editor extends React.Component {
e.target.blur();
this.applyHistory(this.history.undo(this.imageCanvas));
this.deriveButtonStates();
sendEvent("undo", "annotation-toolbar");
}

onRedo(e) {
Expand All @@ -317,6 +318,7 @@ exports.Editor = class Editor extends React.Component {
e.target.blur();
this.applyHistory(this.history.redo(this.imageCanvas));
this.deriveButtonStates();
sendEvent("redo", "annotation-toolbar");
}

applyHistory(record) {
Expand Down

0 comments on commit 1257f22

Please sign in to comment.