diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-07-31 03:01:55 -0400 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-07-31 03:01:55 -0400 |
commit | 951d6a8681e9be9068c8a0f8fce659938ab9ed80 (patch) | |
tree | ade7ee0af98b9a4489dcb01d70ac4ee7a17ae9d9 /src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx | |
parent | fb4b4658f39c2a845174372a8fd814c49bf26d7c (diff) |
basic template generation work
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx index 34bec3b88..7993cab28 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx @@ -311,7 +311,9 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> { <img className='docCreatorMenu-preview-image' src={info.icon!.url.href.replace(".png", "_o.png")} /> </div> )})} - <div className='docCreatorMenu-preview-window empty'> + <div className='docCreatorMenu-preview-window empty' + onPointerDown={e => this.setUpButtonClick(e, this.basicTemplateTest)} + > <FontAwesomeIcon icon='plus' color='rgb(160, 160, 160)'/> </div> </div> @@ -543,6 +545,15 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> { ); } + basicTemplateTest = () => { + const temps: {width: number; height: number; x: number; y: number; title: string}[] = [ + {width: 200, height: 50, x: -100, y: -200, title: 'title'}, + {width: 300, height: 300, x: -150, y: -100, title: 'image'}, + {width: 200, height: 50, x: -100, y: -200, title: 'description'}, + ] + this._dataViz?.createBasicTemplates(temps); + } + get renderSelectedViewType(){ switch (this._menuContent){ case 'templates': |