aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-10-12 13:09:53 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-10-12 13:09:53 -0400
commit8910a2649a1b2edea9843df1b780937ad0e69fb5 (patch)
treedb0c367014208e36b99e753f3d650eb1b8567ae3 /src/client/documents/Documents.ts
parent34a8b9dd402a247e7ad0a57115935b1e3a04a8d3 (diff)
color picker as document in sidebar now.
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 6b56fb443..e783848ff 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -46,6 +46,7 @@ import { DocumentType } from "./DocumentTypes";
import { LinkFollowBox } from "../views/linking/LinkFollowBox";
import { PresElementBox } from "../views/presentationview/PresElementBox";
import { QueryBox } from "../views/nodes/QueryBox";
+import { ColorBox } from "../views/nodes/ColorBox";
var requestImageSize = require('../util/request-image-size');
var path = require('path');
@@ -69,6 +70,7 @@ export interface DocumentOptions {
templates?: List<string>;
viewType?: number;
backgroundColor?: string;
+ ignoreClick?: boolean;
opacity?: number;
defaultBackgroundColor?: string;
dropAction?: dropActionType;
@@ -127,6 +129,10 @@ export namespace Docs {
layout: { view: QueryBox },
options: { width: 400, fitWidth: true }
}],
+ [DocumentType.COLOR, {
+ layout: { view: ColorBox },
+ options: { nativeWidth: 220, nativeHeight: 300 }
+ }],
[DocumentType.IMG, {
layout: { view: ImageBox, ext: anno },
options: {}
@@ -386,6 +392,10 @@ export namespace Docs {
return InstanceFromProto(Prototypes.get(DocumentType.QUERY), "", options);
}
+ export function ColorDocument(options: DocumentOptions = {}) {
+ return InstanceFromProto(Prototypes.get(DocumentType.COLOR), "", options);
+ }
+
export function TextDocument(options: DocumentOptions = {}) {
return InstanceFromProto(Prototypes.get(DocumentType.TEXT), "", options);
}