diff options
author | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-05-16 21:24:15 -0400 |
---|---|---|
committer | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-05-16 21:24:15 -0400 |
commit | 3d12a980fee4eb5689bffa6ec82c7899e1509fa9 (patch) | |
tree | 24ffd982396c53c74032303ba66bb6f72ced40f5 /src/fields/SchemaHeaderField.ts | |
parent | d8fe4e0b9924b6f7f6f79da7745642d68bef5436 (diff) | |
parent | 2e6cba3995d82acc15bd34a7035e4a5786795211 (diff) |
Merge branch 'master' into physics_simulation
Diffstat (limited to 'src/fields/SchemaHeaderField.ts')
-rw-r--r-- | src/fields/SchemaHeaderField.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fields/SchemaHeaderField.ts b/src/fields/SchemaHeaderField.ts index 0b51db70b..4b1855cb0 100644 --- a/src/fields/SchemaHeaderField.ts +++ b/src/fields/SchemaHeaderField.ts @@ -2,7 +2,7 @@ import { Deserializable } from '../client/util/SerializationHelper'; import { serializable, primitive } from 'serializr'; import { ObjectField } from './ObjectField'; import { Copy, ToScriptString, ToString, OnUpdate } from './FieldSymbols'; -import { scriptingGlobal } from '../client/util/ScriptingGlobals'; +import { scriptingGlobal, ScriptingGlobals } from '../client/util/ScriptingGlobals'; import { ColumnType } from '../client/views/collections/collectionSchema/CollectionSchemaView'; export const PastelSchemaPalette = new Map<string, string>([ @@ -115,9 +115,12 @@ export class SchemaHeaderField extends ObjectField { } [ToScriptString]() { - return `header(${this.heading},${this.type},${this.width}})`; + return `schemaHeaderField("${this.heading}","${this.color}",${this.type},${this.width},${this.desc},${this.collapsed})`; } [ToString]() { return `SchemaHeaderField`; } } +ScriptingGlobals.add(function schemaHeaderField(heading: string, color: string, type: number, width: number, desc?: boolean, collapsed?: boolean) { + return new SchemaHeaderField(heading, color, type, width, desc, collapsed); +}); |