From b42bfb6cb8d4d2355fae4fe628c6bf5cca4b084a Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:47:23 -0400 Subject: old code removed --- src/client/views/nodes/DataVizBox/DataVizBox.tsx | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx index 43cfe5bba..1994f1b01 100644 --- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx +++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx @@ -569,31 +569,14 @@ export class DataVizBox extends ViewBoxAnnotatableComponent() { createBasicTemplates = (colsToLayout: {width: number, height: number, x: number, y: number, title: string}[]) => { const mainCollection = this.DocumentView?.().containerViewPath?.().lastElement()?.ComponentView as CollectionFreeFormView; - // const docTools: Doc[] = DocListCast(DocListCast(Doc.MyTools?.data)[0]?.data); - // const index = docTools.map(doc => doc.title).indexOf('Col'); - // const template: Doc | undefined = DocUtils.copyDragFactory(Cast(docTools[index]?.dragFactory, Doc, null)); - //if (!template) return; - //const template = new CollectionFreeFormView({}); const fields: Doc[] = colsToLayout.map(layout => { const field = Docs.Create.TextDocument('', { _height: layout.height, _width: layout.width, title: layout.title, x: layout.x, y: layout.y }); - // Doc.SetContainer(field, template); - // inheritParentAcls(template, field, true); - //template.data = 'hey'//DocListCast(template.data).map(doc => `idToDoc("${doc[Id]}")`).push(`idToDoc("${field[Id]}")`); return field; }); const template = Docs.Create.FreeformDocument(fields, { _height: 500, _width: 500, title: 'template', x: 400, y: 400 }) - const fieldLiterals: string[] = fields.map(field => `idToDoc("${field[Id]}")`); - - //template.data = fieldLiterals[0]; - - // template.x = 400; - // template.y = 400; - // template._width = 500; - // template._height = 500; - mainCollection.addDocument(template); } -- cgit v1.2.3-70-g09d2