diff options
author | dinhanhtruong <70963346+dinhanhtruong@users.noreply.github.com> | 2021-08-28 16:58:02 -0400 |
---|---|---|
committer | dinhanhtruong <70963346+dinhanhtruong@users.noreply.github.com> | 2021-08-28 16:58:02 -0400 |
commit | 646175b9870fb535648c8a9473c245bac57474b3 (patch) | |
tree | dd9dfa5b4d81db11257c6a584a809ee71132a75a /src/fields/Doc.ts | |
parent | fe2fa471927060e8258ae08cc5b72b26661905e1 (diff) |
added variable link weights based on relationship importance
Link lines are thicker for links belonging to more important relationships. Thickness varies linearly from 3px to 12px. Removed dashed linked lines.
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 17f41fac8..c57f31068 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -80,6 +80,7 @@ export function DocListCastAsync(field: FieldResult, defaultValue?: Doc[]) { export async function DocCastAsync(field: FieldResult): Promise<Opt<Doc>> { return Cast(field, Doc); } +export function NumListCast(field: FieldResult) { return Cast(field, listSpec("number"), []); } export function StrListCast(field: FieldResult) { return Cast(field, listSpec("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; } |