aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbrynnchernosky <56202540+brynnchernosky@users.noreply.github.com>2023-01-26 22:15:06 -0500
committerbrynnchernosky <56202540+brynnchernosky@users.noreply.github.com>2023-01-26 22:15:06 -0500
commita555303c34ec2ac79084100bdf21f9d88dba86b1 (patch)
tree632587a83d856b0c13a142818193945db4de5787 /src/client/documents/Documents.ts
parentc9be6d566851c90cd6050e16ef19fddb87ccc778 (diff)
add option to colon menu
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 46d7c087c..c7556d668 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -657,7 +657,13 @@ export namespace Docs {
options: { _fitWidth: true, _fitHeight: true, nativeDimModifiable: true, links: '@links(self)' },
},
],
- [DocumentType.SIMULATION, { layout: { view: PhysicsSimulationBox, dataField: defaultDataKey }, options: { _height: 150 } }]
+ [
+ DocumentType.SIMULATION,
+ {
+ layout: { view: PhysicsSimulationBox, dataField: defaultDataKey },
+ options: { _height: 150 }
+ }
+ ]
]);
const suffix = 'Proto';
@@ -1178,9 +1184,9 @@ export namespace Docs {
return InstanceFromProto(proto, undefined, options);
}
- // export function SimulationDocument(options: DocumentOptions = {}) {
- // return InstanceFromProto(Prototypes.get(DocumentType.SIMULATION), undefined, { title: document.title, ...options });
- // }
+ export function SimulationDocument(options?: DocumentOptions) {
+ return InstanceFromProto(Prototypes.get(DocumentType.SIMULATION), undefined, { ...(options || {}) });
+ }
}
}