aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/documents')
-rw-r--r--src/client/documents/DocumentTypes.ts29
-rw-r--r--src/client/documents/Documents.ts14
2 files changed, 17 insertions, 26 deletions
diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts
index 5bd5590b7..19e469637 100644
--- a/src/client/documents/DocumentTypes.ts
+++ b/src/client/documents/DocumentTypes.ts
@@ -14,17 +14,15 @@ export enum DocumentType {
SCREENSHOT = "screenshot",
FONTICON = "fonticonbox",
FILTER = "filter",
- SEARCH = "search",
- LABEL = "label",
- BUTTON = "button",
- WEBCAM = "webcam",
- HTMLANCHOR = "htmlanchor",
- DATE = "date",
- SCRIPTING = "script",
- EQUATION = "equation",
- FUNCPLOT = "funcplot",
- MAP = "map",
-
+ SEARCH = "search", // search query
+ LABEL = "label", // simple text label
+ BUTTON = "button", // onClick button
+ WEBCAM = "webcam", // webcam
+ MARKER = "marker", // generic marker document not intended to be viewed independently of its context (e.g., for text selections in PDF/Web/RTF)
+ DATE = "date", // calendar view of a date
+ SCRIPTING = "script", // script editor
+ EQUATION = "equation", // equation editor
+ FUNCPLOT = "funcplot", // function plotter
// special purpose wrappers that either take no data or are compositions of lower level types
LINK = "link",
@@ -39,10 +37,7 @@ export enum DocumentType {
COMPARISON = "comparison",
GROUP = "group",
- LINKDB = "linkdb",
- SCRIPTDB = "scriptdb",
- GROUPDB = "groupdb",
-
- TEXTANCHOR = "textanchor" // selection of text in a text box
- ,
+ LINKDB = "linkdb", // database of links ??? why do we have this
+ 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 eb1bd2058..584ce1846 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -432,7 +432,7 @@ export namespace Docs {
[DocumentType.PRESELEMENT, {
layout: { view: PresElementBox, dataField: defaultDataKey }
}],
- [DocumentType.HTMLANCHOR, {
+ [DocumentType.MARKER, {
layout: { view: CollectionView, dataField: defaultDataKey },
options: { links: ComputedField.MakeFunction("links(self)") as any, hideLinkButton: true }
}],
@@ -457,10 +457,6 @@ export namespace Docs {
layout: { view: EmptyBox, dataField: defaultDataKey },
options: { links: ComputedField.MakeFunction("links(self)") as any }
}],
- [DocumentType.TEXTANCHOR, {
- layout: { view: EmptyBox, dataField: defaultDataKey },
- options: { targetDropAction: "move", links: ComputedField.MakeFunction("links(self)") as any, hideLinkButton: true }
- }]
]);
const suffix = "Proto";
@@ -675,9 +671,9 @@ export namespace Docs {
viewProps["acl-Override"] = "None";
viewProps["acl-Public"] = Doc.UserDoc()?.defaultAclPrivate ? SharingPermissions.None : SharingPermissions.Add;
const viewDoc = Doc.assign(Doc.MakeDelegate(dataDoc, delegId), viewProps, true, true);
- ![DocumentType.LINK, DocumentType.TEXTANCHOR, DocumentType.LABEL].includes(viewDoc.type as any) && DocUtils.MakeLinkToActiveAudio(() => viewDoc);
+ ![DocumentType.LINK, DocumentType.MARKER, DocumentType.LABEL].includes(viewDoc.type as any) && DocUtils.MakeLinkToActiveAudio(() => viewDoc);
- !Doc.IsSystem(dataDoc) && ![DocumentType.HTMLANCHOR, DocumentType.KVP, DocumentType.LINK, DocumentType.LINKANCHOR, DocumentType.TEXTANCHOR].includes(proto.type as any) &&
+ !Doc.IsSystem(dataDoc) && ![DocumentType.MARKER, DocumentType.KVP, DocumentType.LINK, DocumentType.LINKANCHOR].includes(proto.type as any) &&
!dataDoc.isFolder && !dataProps.annotationOn && Doc.AddDocToList(Cast(Doc.UserDoc().myFileOrphans, Doc, null), "data", dataDoc);
return viewDoc;
@@ -811,7 +807,7 @@ export namespace Docs {
}
export function TextanchorDocument(options: DocumentOptions = {}, id?: string) {
- return InstanceFromProto(Prototypes.get(DocumentType.TEXTANCHOR), undefined, options, id);
+ return InstanceFromProto(Prototypes.get(DocumentType.MARKER), undefined, options, id);
}
export function FreeformDocument(documents: Array<Doc>, options: DocumentOptions, id?: string) {
@@ -820,7 +816,7 @@ export namespace Docs {
return inst;
}
export function HTMLAnchorDocument(documents: Array<Doc>, options: DocumentOptions, id?: string) {
- return InstanceFromProto(Prototypes.get(DocumentType.HTMLANCHOR), new List(documents), options, id);
+ return InstanceFromProto(Prototypes.get(DocumentType.MARKER), new List(documents), options, id);
}
export function PileDocument(documents: Array<Doc>, options: DocumentOptions, id?: string) {