aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/DocumentManager.ts5
-rw-r--r--src/client/util/SelectionManager.ts1
-rw-r--r--src/client/util/UndoManager.ts16
3 files changed, 9 insertions, 13 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index 561114182..ae5fafcdd 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -36,7 +36,6 @@ export class DocumentManager {
}
public DeleteDocumentView(dv: DocumentView) {
this._documentViews.delete(dv);
- console.log("deleted")
}
//private constructor so no other class can create a nodemanager
@@ -95,7 +94,7 @@ export class DocumentManager {
this.callAddViewFuncs(view);
} // prettier-ignore
};
-
+
public RemoveView = action((view: DocumentView) => {
if (!view._props.LayoutTemplateString?.includes(KeyValueBox.name) && !view._props.LayoutTemplateString?.includes(LinkAnchorBox.name)) {
this.DeleteDocumentView(view);
@@ -127,8 +126,6 @@ export class DocumentManager {
public getDocumentView(target: Doc | undefined, preferredCollection?: DocumentView): DocumentView | undefined {
const docViewArray = DocumentManager.Instance.DocumentViews;
- //console.log(docViewArray)
- //console.log(this._documentViews)
const passes = !target ? [] : preferredCollection ? [preferredCollection, undefined] : [undefined];
return passes.reduce(
(toReturn, pass) =>
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index b6ee4d5c3..dd34d5f22 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -9,7 +9,6 @@ import { DocumentView } from '../views/nodes/DocumentView';
import { LinkManager } from './LinkManager';
import { ScriptingGlobals } from './ScriptingGlobals';
import { UndoManager } from './UndoManager';
-import { SchemaRowBox } from '../views/collections/collectionSchema/SchemaRowBox';
export class SelectionManager {
private static _manager: SelectionManager;
diff --git a/src/client/util/UndoManager.ts b/src/client/util/UndoManager.ts
index 20801baa7..b16fed675 100644
--- a/src/client/util/UndoManager.ts
+++ b/src/client/util/UndoManager.ts
@@ -97,13 +97,13 @@ export namespace UndoManager {
export function AddEvent(event: UndoEvent, value?: any): void {
if (currentBatch && batchCounter.get() && !undoing) {
- // console.log(
- // ' '.slice(0, batchCounter.get()) +
- // 'UndoEvent : ' +
- // event.prop +
- // ' = ' +
- // (value instanceof RichTextField ? value.Text : value instanceof Array ? value.map(val => Field.toJavascriptString(val)).join(',') : Field.toJavascriptString(value))
- // );
+ console.log(
+ ' '.slice(0, batchCounter.get()) +
+ 'UndoEvent : ' +
+ event.prop +
+ ' = ' +
+ (value instanceof RichTextField ? value.Text : value instanceof Array ? value.map(val => Field.toJavascriptString(val)).join(',') : Field.toJavascriptString(value))
+ );
currentBatch.push(event);
tempEvents?.push(event);
}
@@ -181,7 +181,7 @@ export namespace UndoManager {
const EndBatch = action((batchName: string, cancel: boolean = false) => {
runInAction(() => batchCounter.set(batchCounter.get() - 1));
- //console.log(' '.slice(0, batchCounter.get()) + 'End ' + batchName + ' (' + currentBatch?.length + ')');
+ console.log(' '.slice(0, batchCounter.get()) + 'End ' + batchName + ' (' + currentBatch?.length + ')');
if (batchCounter.get() === 0 && currentBatch?.length) {
if (!cancel) {
undoStack.push(currentBatch);