From 97f750f4897dfd404ffd38bd8205092273f457fc Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Sat, 6 Apr 2019 04:05:16 -0400 Subject: Added undo trace function --- src/client/util/UndoManager.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client') 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[] { 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; -- cgit v1.2.3-70-g09d2 From b680f3db2f9fb6dc65f47848234e96453ef60a5c Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Sat, 6 Apr 2019 04:09:32 -0400 Subject: Removed prepareDrag --- src/client/views/Main.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/client') diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index a324421ac..237eb3b6e 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -235,15 +235,6 @@ export class Main extends React.Component { ContainingCollectionView={undefined} /> } - @undoBatch - @action - prepareDrag = ( - _reference: React.RefObject, - docFunc: () => Document, - removeFunc: (containingCollection: CollectionView) => void = () => { }) => { - return setupDrag(_reference, docFunc, removeFunc); - } - /* for the expandable add nodes menu. Not included with the miscbuttons because once it expands it expands the whole div with it, making canvas interactions limited. */ @computed get nodesMenu() { @@ -283,7 +274,7 @@ export class Main extends React.Component {
    {btns.map(btn =>
  • -
  • )} -- cgit v1.2.3-70-g09d2