aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/CurrentUserUtils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-09 17:13:49 -0400
committerbobzel <zzzman@gmail.com>2022-06-09 17:13:49 -0400
commitd1f268c1788f54c62c0779aba224b5b7d30edb01 (patch)
tree1b113ed7af33d6eaad6f30b81d772ff40afd2c6e /src/client/util/CurrentUserUtils.ts
parent140e2f643f97057ba9c89c502cff7843bd738cd6 (diff)
changed tab numbering to be relative to dashboard.
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r--src/client/util/CurrentUserUtils.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 2d2dda2b8..3107650d9 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -1215,8 +1215,6 @@ export class CurrentUserUtils {
const presentation = Doc.MakeCopy(userDoc.emptyPresentation as Doc, true);
const dashboards = await Cast(userDoc.myDashboards, Doc) as Doc;
const dashboardCount = DocListCast(dashboards.data).length + 1;
- const emptyPane = Cast(userDoc.emptyPane, Doc, null);
- emptyPane["dragFactory-count"] = NumCast(emptyPane["dragFactory-count"]) + 1;
const freeformOptions: DocumentOptions = {
x: 0,
y: 400,
@@ -1224,7 +1222,7 @@ export class CurrentUserUtils {
_height: 1000,
_fitWidth: true,
_backgroundGridShow: true,
- title: `Untitled Tab ${NumCast(emptyPane["dragFactory-count"])}`,
+ title: `Untitled Tab 1`,
};
const freeformDoc = CurrentUserUtils.GuestTarget || Docs.Create.FreeformDocument([], freeformOptions);
const dashboardDoc = Docs.Create.StandardCollectionDockingDocument([{ doc: freeformDoc, initialWidth: 600 }], { title: `Dashboard ${dashboardCount}` }, id, "row");
@@ -1233,6 +1231,7 @@ export class CurrentUserUtils {
// switching the tabs from the datadoc to the regular doc
const dashboardTabs = DocListCast(dashboardDoc[DataSym].data);
dashboardDoc.data = new List<Doc>(dashboardTabs);
+ dashboardDoc["pane-count"] = 1;
userDoc.activePresentation = presentation;