diff options
author | bobzel <zzzman@gmail.com> | 2022-09-13 22:43:43 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-09-13 22:43:43 -0400 |
commit | 6577c36514bbcf883e7b74f6b1a4348a5ce474e3 (patch) | |
tree | 4fe8a629b544c520c23bdbd360a46992d3bd351c /src/fields/Doc.ts | |
parent | 2f6cdc734d8a5855db3e0f4ee1d6b9535d20f325 (diff) | |
parent | 8ded118135a5e296a83a85cf3f2180be56c6a045 (diff) |
Merge branch 'sharing-jenny'
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 3ce22bacb..cf505c45b 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -180,7 +180,7 @@ export class Doc extends RefField { return DocCast(Doc.UserDoc().myRecentlyClosed); } public static get MyTrails() { - return DocCast(Doc.UserDoc().myTrails); + return DocCast(Doc.ActiveDashboard?.myTrails); } public static get MyOverlayDocs() { return DocCast(Doc.UserDoc().myOverlayDocs); @@ -225,11 +225,13 @@ export class Doc extends RefField { public static get ActiveTool(): InkTool { return StrCast(Doc.UserDoc().activeTool, InkTool.None) as InkTool; } - public static get ActivePresentation() { - return DocCast(Doc.UserDoc().activePresentation); + public static get ActivePresentation(): Opt<Doc> { + return DocCast(Doc.ActiveDashboard?.activePresentation); } public static set ActivePresentation(val) { - Doc.UserDoc().activePresentation = new PrefetchProxy(val); + if (Doc.ActiveDashboard) { + Doc.ActiveDashboard.activePresentation = val; + } } constructor(id?: FieldId, forceSave?: boolean) { super(id); |