aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/WebBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-01-20 11:17:38 -0500
committerbobzel <zzzman@gmail.com>2023-01-20 11:17:38 -0500
commit84f728cffb94319b86be8d6cc478ce424ec45c2f (patch)
treeef36f48f89d1d57f48aae20a1c43628eefc4c18c /src/client/views/nodes/WebBox.tsx
parentd5f796b433d7e72130d4109a3775347ccb10c454 (diff)
removed tour map from lightbox. added option to create anchors without adding thm as annotations. made zoom of text an option for pres and links
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
-rw-r--r--src/client/views/nodes/WebBox.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx
index 8be4884ce..acf4fe4b0 100644
--- a/src/client/views/nodes/WebBox.tsx
+++ b/src/client/views/nodes/WebBox.tsx
@@ -307,7 +307,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps
return undefined;
};
- getAnchor = () => {
+ getAnchor = (addAsAnnotation: boolean) => {
let ele: Opt<HTMLDivElement> = undefined;
try {
const contents = this._iframe?.contentWindow?.getSelection()?.getRangeAt(0).cloneContents();
@@ -317,7 +317,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps
}
} catch (e) {}
const anchor =
- this._getAnchor(this._savedAnnotations) ??
+ this._getAnchor(this._savedAnnotations, false) ??
Docs.Create.WebanchorDocument(this._url, {
title: StrCast(this.rootDoc.title + ' ' + this.layoutDoc._scrollTop),
y: NumCast(this.layoutDoc._scrollTop),
@@ -325,7 +325,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps
});
anchor.text = ele?.textContent ?? '';
anchor.textHtml = ele?.innerHTML;
- this.addDocumentWrapper(anchor);
+ addAsAnnotation && this.addDocumentWrapper(anchor);
return anchor;
};