diff options
author | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-01-20 10:48:58 -0500 |
---|---|---|
committer | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-01-25 18:51:53 -0500 |
commit | cbce4b61ab4d11f3210ca004b935fae65b023408 (patch) | |
tree | c00b76d6790768ec4c0a64ba7d3d84b05eb97f4b /src/client/documents/Documents.ts | |
parent | 883523209d0c3e21c29079a61f0ee3a97d55c9e0 (diff) |
add new view
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 80b040cc0..d3f95de8b 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -50,6 +50,7 @@ import { LinkDescriptionPopup } from '../views/nodes/LinkDescriptionPopup'; import { LoadingBox } from '../views/nodes/LoadingBox'; import { MapBox } from '../views/nodes/MapBox/MapBox'; import { PDFBox } from '../views/nodes/PDFBox'; +import { PhysicsSimulationBox } from '../views/nodes/PhysicsSimulationBox'; import { RecordingBox } from '../views/nodes/RecordingBox/RecordingBox'; import { ScreenshotBox } from '../views/nodes/ScreenshotBox'; import { ScriptingBox } from '../views/nodes/ScriptingBox'; @@ -656,6 +657,7 @@ export namespace Docs { options: { _fitWidth: true, _fitHeight: true, nativeDimModifiable: true, links: '@links(self)' }, }, ], + [DocumentType.SIMULATION, { layout: { view: PhysicsSimulationBox, dataField: defaultDataKey }, options: { _height: 150 } }] ]); const suffix = 'Proto'; @@ -1175,6 +1177,8 @@ export namespace Docs { export function DelegateDocument(proto: Doc, options: DocumentOptions = {}) { return InstanceFromProto(proto, undefined, options); } + + export function SimulationDocument(options: DocumentOptions = {}) { return InstanceFromProto(Prototypes.get(DocumentType.SIMULATION), document, { title: document.title, ...options }); } } } |