From 7e4d793eaa7e5b6b564355a11fa02a5611645f20 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 21 Mar 2025 18:58:21 -0400
Subject: trying to improve how data / layout / root and templtae docs are
 accessed.

---
 src/client/views/collections/CollectionDockingView.tsx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'src/client/views/collections/CollectionDockingView.tsx')

diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index e51bc18ef..a45b37f43 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -503,9 +503,8 @@ export class CollectionDockingView extends CollectionSubView() {
         });
         const dashboardDoc = Docs.Create.DockDocument(newtabs, json, { title: incrementTitleCopy(StrCast(doc.title)) });
 
-        dashboardDoc.pane_count = 1;
-        dashboardDoc.myOverlayDocs = new List<Doc>();
-        dashboardDoc.myPublishedDocs = new List<Doc>();
+        dashboardDoc.$myOverlayDocs = new List<Doc>();
+        dashboardDoc.$myPublishedDocs = new List<Doc>();
 
         DashboardView.SetupDashboardTrails();
         DashboardView.SetupDashboardCalendars(); // Zaul TODO: needed?
@@ -555,13 +554,13 @@ export class CollectionDockingView extends CollectionSubView() {
         stack.header?.element.on('mousedown', (e: MouseEvent) => {
             const dashboard = Doc.ActiveDashboard;
             if (dashboard && e.target === stack.header?.element[0] && e.button === 2) {
-                dashboard.pane_count = NumCast(dashboard.pane_count) + 1;
+                dashboard.$myPaneCount = NumCast(dashboard.$myPaneCount) + 1;
                 const docToAdd = Docs.Create.FreeformDocument([], {
                     _width: this._props.PanelWidth(),
                     _height: this._props.PanelHeight(),
                     _freeform_backgroundGrid: true,
                     _layout_fitWidth: true,
-                    title: `Untitled Tab ${NumCast(dashboard.pane_count)}`,
+                    title: `Untitled Tab ${NumCast(dashboard.$myPaneCount)}`,
                 });
                 Doc.AddDocToList(Doc.MyHeaderBar, 'data', docToAdd, undefined, undefined, true);
                 inheritParentAcls(this.Document, docToAdd, false);
@@ -572,13 +571,13 @@ export class CollectionDockingView extends CollectionSubView() {
         const addNewDoc = undoable(() => {
             const dashboard = Doc.ActiveDashboard;
             if (dashboard) {
-                dashboard.pane_count = NumCast(dashboard.pane_count) + 1;
+                dashboard.$myPaneCount = NumCast(dashboard.$myPaneCount) + 1;
                 const docToAdd = Docs.Create.FreeformDocument([], {
                     _width: this._props.PanelWidth(),
                     _height: this._props.PanelHeight(),
                     _layout_fitWidth: true,
                     _freeform_backgroundGrid: true,
-                    title: `Untitled Tab ${NumCast(dashboard.pane_count)}`,
+                    title: `Untitled Tab ${NumCast(dashboard.$myPaneCount)}`,
                 });
                 Doc.AddDocToList(Doc.MyHeaderBar, 'data', docToAdd, undefined, undefined, true);
                 inheritParentAcls(this.dataDoc, docToAdd, false);
-- 
cgit v1.2.3-70-g09d2

