diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DataVizBox.tsx | 17 |
1 files changed, 0 insertions, 17 deletions
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<FieldViewProps>() { 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); } |