diff options
author | bobzel <zzzman@gmail.com> | 2023-01-30 15:23:40 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-01-30 15:23:40 -0500 |
commit | 5e2f64f3ee172e37d0d3277637a7778b640a2066 (patch) | |
tree | 11f9a5862e7e70b2eeb931f4eb3c5b509a3714cf /src/fields/SchemaHeaderField.ts | |
parent | 95b8a5a2b470d3118b6eeac484a45b23df2830b4 (diff) |
fixed pointerEvents for text box footnotes. fixed keyvalue editing to not typecheck. fixed schema header field editing from keyvalue pane. fixed webBox error causing overlayview to not work for Repls and others. fixed some layout issues with stackingview columns.
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); +}); |