diff options
author | bobzel <zzzman@gmail.com> | 2020-08-22 14:58:29 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-22 14:58:29 -0400 |
commit | a2e794def459f176a69bd4f3bab7e0a180e72d26 (patch) | |
tree | ca48e54d716a7305932916d8825a668d70c6b9d5 /src/client/views/MainView.tsx | |
parent | a590446a1f13aa4c00a8367f222dbc1b1efc5599 (diff) |
added increment title numbering to standard documents
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 9c5421a85..ccb051f6d 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -257,13 +257,14 @@ export class MainView extends React.Component { const presentation = Doc.MakeCopy(Doc.UserDoc().emptyPresentation as Doc, true); const dashboards = Cast(this.userDoc.myDashboards, Doc) as Doc; const dashboardCount = DocListCast(dashboards.data).length + 1; - this.userDoc.myTabCount = NumCast(this.userDoc.myTabCount) + 1; + const emptyPane = Cast(this.userDoc.emptyPane, Doc, null); + emptyPane["dragFactory-count"] = NumCast(emptyPane["dragFactory-count"]) + 1; const freeformOptions: DocumentOptions = { x: 0, y: 400, _width: this._panelWidth * .7 - this.propertiesWidth() * 0.7, _height: this._panelHeight, - title: `Untitled Tab ${NumCast(this.userDoc.myTabCount)}`, + title: `Untitled Tab ${NumCast(emptyPane["dragFactory-count"])}`, }; const freeformDoc = CurrentUserUtils.GuestTarget || Docs.Create.FreeformDocument([], freeformOptions); const dashboardDoc = Docs.Create.StandardCollectionDockingDocument([{ doc: freeformDoc, initialWidth: 600, path: [myCatalog] }], { title: `Dashboard ${dashboardCount}` }, id, "row"); |