aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-09-02 15:04:44 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-09-02 15:04:44 -0500
commitcb28e0cc898b0f7f880a23501bc1510df3c1c3fc (patch)
tree885caa3652e04a1dc9825c49822cb7a0c73c82fe /src/client/documents
parent831e634e9a541eca34da163d879c80b97292204d (diff)
parenta7975e6f18b0d837403ced65ee5979b60b43f5bc (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_bug_fixes
Diffstat (limited to 'src/client/documents')
-rw-r--r--src/client/documents/DocumentTypes.ts7
-rw-r--r--src/client/documents/Documents.ts8
2 files changed, 12 insertions, 3 deletions
diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts
index 1bef6fa08..37a148e55 100644
--- a/src/client/documents/DocumentTypes.ts
+++ b/src/client/documents/DocumentTypes.ts
@@ -13,7 +13,8 @@ export enum DocumentType {
INK = "inks", // ink stroke
SCREENSHOT = "screenshot", // view of a desktop application
FONTICON = "fonticonbox", // font icon
- SEARCH = "search", // search query
+ FILTER = "filter",
+ SEARCH = "search", // search query
LABEL = "label", // simple text label
BUTTON = "button", // onClick button
WEBCAM = "webcam", // webcam
@@ -32,10 +33,10 @@ export enum DocumentType {
YOUTUBE = "youtube", // youtube directory (view of you tube search results)
DOCHOLDER = "docholder", // nested document (view of a document)
SEARCHITEM = "searchitem",
- COMPARISON = "comparison", // before/after view with slider (view of 2 images)
+ COMPARISON = "comparison", // before/after view with slider (view of 2 images)
GROUP = "group", // group of users
LINKDB = "linkdb", // database of links ??? why do we have this
- SCRIPTDB = "scriptdb", // database of scripts
+ SCRIPTDB = "scriptdb", // database of scripts
GROUPDB = "groupdb" // database of groups
} \ No newline at end of file
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index feb84843d..fbcecbec6 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -50,6 +50,7 @@ import { PresElementBox } from "../views/presentationview/PresElementBox";
import { SearchBox } from "../views/search/SearchBox";
import { DashWebRTCVideo } from "../views/webcam/DashWebRTCVideo";
import { DocumentType } from "./DocumentTypes";
+import { FilterBox } from "../views/nodes/FilterBox";
const path = require('path');
const defaultNativeImageDim = Number(DFLT_IMAGE_NATIVE_DIM.replace("px", ""));
@@ -246,6 +247,10 @@ export namespace Docs {
layout: { view: SearchBox, dataField: defaultDataKey },
options: { _width: 400 }
}],
+ [DocumentType.FILTER, {
+ layout: { view: FilterBox, dataField: defaultDataKey },
+ options: { _width: 400 }
+ }],
[DocumentType.COLOR, {
layout: { view: ColorBox, dataField: defaultDataKey },
options: { _nativeWidth: 220, _nativeHeight: 300 }
@@ -821,6 +826,9 @@ export namespace Docs {
export function FontIconDocument(options?: DocumentOptions) {
return InstanceFromProto(Prototypes.get(DocumentType.FONTICON), undefined, { hideLinkButton: true, ...(options || {}) });
}
+ export function FilterDocument(options?: DocumentOptions) {
+ return InstanceFromProto(Prototypes.get(DocumentType.FILTER), undefined, { ...(options || {}) });
+ }
export function PresElementBoxDocument(options?: DocumentOptions) {
return InstanceFromProto(Prototypes.get(DocumentType.PRESELEMENT), undefined, { ...(options || {}) });