diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-04-06 04:05:16 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-04-06 04:05:16 -0400 |
commit | 97f750f4897dfd404ffd38bd8205092273f457fc (patch) | |
tree | 118e67ff18b6df4eff0b9323650c33c664975fb2 /src | |
parent | e6057a0996d8f855dfd274b77cdb6fb5a27eaf8e (diff) |
Added undo trace function
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/UndoManager.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/util/UndoManager.ts b/src/client/util/UndoManager.ts index 6d1b2f1b8..eb13ff1ee 100644 --- a/src/client/util/UndoManager.ts +++ b/src/client/util/UndoManager.ts @@ -1,6 +1,7 @@ import { observable, action } from "mobx"; import 'source-map-support/register' import { Without } from "../../Utils"; +import { string } from "prop-types"; function getBatchName(target: any, key: string | symbol): string { let keyName = key.toString(); @@ -84,6 +85,9 @@ export namespace UndoManager { export function GetOpenBatches(): Without<Batch, 'end'>[] { return openBatches; } + export function TraceOpenBatches() { + console.log(`Open batches:\n\t${openBatches.map(batch => batch.batchName).join("\n\t")}\n`); + } export class Batch { private disposed: boolean = false; |