diff options
Diffstat (limited to 'src/fields')
-rw-r--r-- | src/fields/Doc.ts | 1 | ||||
-rw-r--r-- | src/fields/documentSchemas.ts | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 4c3c45d92..7b01d60e5 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -76,6 +76,7 @@ export function DocListCastAsync(field: FieldResult, defaultValue?: Doc[]) { export async function DocCastAsync(field: FieldResult): Promise<Opt<Doc>> { return Cast(field, Doc); } +export function StrListCast(field: FieldResult) { return Cast(field, listSpec("string"), []) as string[]; } export function DocListCast(field: FieldResult) { return Cast(field, listSpec(Doc), []).filter(d => d instanceof Doc) as Doc[]; } export function DocListCastOrNull(field: FieldResult) { return Cast(field, listSpec(Doc), null)?.filter(d => d instanceof Doc) as Doc[] | undefined; } diff --git a/src/fields/documentSchemas.ts b/src/fields/documentSchemas.ts index e0404d9d3..979238767 100644 --- a/src/fields/documentSchemas.ts +++ b/src/fields/documentSchemas.ts @@ -102,7 +102,7 @@ export const documentSchema = createSchema({ linkDisplay: "boolean", // whether a link connection should be shown between link anchor endpoints. isInPlaceContainer: "boolean",// whether the marked object will display addDocTab() calls that target "inPlace" destinations isLinkButton: "boolean", // whether document functions as a link follow button to follow the first link on the document when clicked - _isBackground: "boolean", // whether document is a background element and ignores input events (can only select with marquee) + layers: listSpec("string"), // which layers the document is part of lockedPosition: "boolean", // whether the document can be moved (dragged) _lockedTransform: "boolean",// whether a freeformview can pan/zoom |