diff options
| author | Sam Wilkins <35748010+samwilkins333@users.noreply.github.com> | 2019-08-08 10:59:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-08 10:59:09 -0400 |
| commit | 9776f0dbb1189105e5b947beb107203f4404c40c (patch) | |
| tree | d6e3e0ecb1398174756183ce2d8a6662b33b29b0 /src/client/views/collections/CollectionBaseView.tsx | |
| parent | 44a0bc3546eca5fa18f3599448ebcebf709e3f90 (diff) | |
| parent | f3a1b96c5587249a1f6d45ecc9b462215da479e2 (diff) | |
Merge pull request #241 from browngraphicslab/speech-to-text
Speech to text overlay with registered commands on shift+space
Diffstat (limited to 'src/client/views/collections/CollectionBaseView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionBaseView.tsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionBaseView.tsx b/src/client/views/collections/CollectionBaseView.tsx index 6801b94fd..b53e83eb1 100644 --- a/src/client/views/collections/CollectionBaseView.tsx +++ b/src/client/views/collections/CollectionBaseView.tsx @@ -22,6 +22,24 @@ export enum CollectionViewType { Masonry } +export namespace CollectionViewType { + + const stringMapping = new Map<string, CollectionViewType>([ + ["invalid", CollectionViewType.Invalid], + ["freeform", CollectionViewType.Freeform], + ["schema", CollectionViewType.Schema], + ["docking", CollectionViewType.Docking], + ["tree", CollectionViewType.Tree], + ["stacking", CollectionViewType.Stacking], + ["masonry", CollectionViewType.Masonry] + ]); + + export const valueOf = (value: string) => { + return stringMapping.get(value.toLowerCase()); + }; + +} + export interface CollectionRenderProps { addDocument: (document: Doc, allowDuplicates?: boolean) => boolean; removeDocument: (document: Doc) => boolean; |
