diff options
author | bobzel <zzzman@gmail.com> | 2020-08-29 00:53:11 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-29 00:53:11 -0400 |
commit | 7b8924d203c6367edbf7e6ffbe2e8f2e6f24b859 (patch) | |
tree | 7870fa5d896c9026ad7042afc283820a0d89ff6e /src/client/util/CurrentUserUtils.ts | |
parent | 2d37a7f6402aca311499fb1d61b05cca2487475f (diff) |
added some link follow options to link Editor. Big overhaul of dockingView to make things undoable and cleaner
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index c60403701..7937072da 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -1025,7 +1025,7 @@ export class CurrentUserUtils { CurrentUserUtils.openDashboard(userDoc, copy); } - public static createNewDashboard = async (userDoc: Doc, id?: string) => { + public static createNewDashboard = (userDoc: Doc, id?: string) => { const myPresentations = userDoc.myPresentations as Doc; const presentation = Doc.MakeCopy(userDoc.emptyPresentation as Doc, true); const dashboards = Cast(userDoc.myDashboards, Doc) as Doc; @@ -1051,11 +1051,13 @@ export class CurrentUserUtils { dashboardDoc.contextMenuLabels = new List<string>(["Toggle Theme Colors", "Toggle Comic Mode", "Snapshot Dashboard", "Create Dashboard"]); Doc.AddDocToList(dashboards, "data", dashboardDoc); - // bcz: strangely, we need a timeout to prevent exceptions/issues initializing GoldenLayout (the rendering engine for Main Container) - setTimeout(() => { - CurrentUserUtils.openDashboard(userDoc, dashboardDoc); - }, 0); + CurrentUserUtils.openDashboard(userDoc, dashboardDoc); } + + public static get ActivePresentation() { return Cast(Doc.UserDoc().activePresentation, Doc, null); } + public static get MyRecentlyClosed() { return Cast(Doc.UserDoc().myRecentlyClosedDocs, Doc, null); } + public static get MyDashboards() { return Cast(Doc.UserDoc().myDashboards, Doc, null); } + public static get EmptyPane() { return Cast(Doc.UserDoc().emptyPane, Doc, null); } } Scripting.addGlobal(function openDragFactory(dragFactory: Doc) { |