diff options
author | bobzel <zzzman@gmail.com> | 2023-12-12 14:06:38 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-12-12 14:06:38 -0500 |
commit | b769a150c8da505289f045b8b296a759c75e03a8 (patch) | |
tree | 7aa8c82b1335bc5fe9e4a1a9fb72a4dcbab3a69f /src/client/util/DocumentManager.ts | |
parent | 6951e98f1b863fe1f404d8bf532a9241e2371ec2 (diff) |
fixed and cleaned up snapping lines
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index ba7a26a7a..7fcda75cc 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -1,4 +1,4 @@ -import { action, computed, makeObservable, observable, ObservableSet, observe } from 'mobx'; +import { action, computed, makeObservable, observable, ObservableSet, observe, reaction } from 'mobx'; import { Doc, DocListCast, Opt } from '../../fields/Doc'; import { AclAdmin, AclEdit, Animation } from '../../fields/DocSymbols'; import { Id } from '../../fields/FieldSymbols'; @@ -20,8 +20,14 @@ import { SelectionManager } from './SelectionManager'; const { Howl } = require('howler'); export class DocumentManager { + private static _instance: DocumentManager; + public static get Instance(): DocumentManager { + return this._instance || (this._instance = new this()); + } + //global holds all of the nodes (regardless of which collection they're in) @observable _documentViews = new Set<DocumentView>(); + @observable.shallow public CurrentlyLoading: Doc[] = []; @observable.shallow public LinkAnchorBoxViews: DocumentView[] = []; @observable.shallow public LinkedDocumentViews: { a: DocumentView; b: DocumentView; l: Doc }[] = []; @computed public get DocumentViews() { @@ -34,12 +40,6 @@ export class DocumentManager { this._documentViews.delete(dv); } - private static _instance: DocumentManager; - public static get Instance(): DocumentManager { - return this._instance || (this._instance = new this()); - } - @observable.shallow public CurrentlyLoading: Doc[] = []; // this assignment doesn't work. the actual assignment happens in DocumentManager's constructor - //private constructor so no other class can create a nodemanager private constructor() { makeObservable(this); |