aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/DocumentManager.ts4
-rw-r--r--src/client/util/DragManager.ts1
-rw-r--r--src/client/util/SelectionManager.ts3
3 files changed, 8 insertions, 0 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index 40d28c690..4cb56bd07 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -36,6 +36,7 @@ export class DocumentManager {
}
public DeleteDocumentView(dv: DocumentView) {
this._documentViews.delete(dv);
+ console.log("deleted")
}
//private constructor so no other class can create a nodemanager
@@ -94,6 +95,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);
@@ -125,6 +127,8 @@ 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/DragManager.ts b/src/client/util/DragManager.ts
index 9627c5df2..7676c3520 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -177,6 +177,7 @@ export namespace DragManager {
constructor(colIndex: number) {
this.colIndex = colIndex;
}
+
colIndex: number;
}
// used by PDFs,Text,Image,Video,Web to conditionally (if the drop completes) create a text annotation when dragging the annotate button from the AnchorMenu when a text/region selection has been made.
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index 36b926053..b6ee4d5c3 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -9,6 +9,7 @@ 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;
@@ -51,6 +52,7 @@ export class SelectionManager {
});
public static DeselectAll = (except?: Doc): void => {
+ //console.log("deselect all")
const found = this.Instance.SelectedViews.find(dv => dv.Document === except);
runInAction(() => {
LinkManager.Instance.currentLink = undefined;
@@ -62,6 +64,7 @@ export class SelectionManager {
dv._props.whenChildContentsActiveChanged(false);
});
runInAction(() => (this.Instance.SelectedViews.length = 0));
+ //not responsible for select onPointerDown
if (found) this.SelectView(found, false);
};