aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf
diff options
context:
space:
mode:
authorgeireann <geireann.lindfield@gmail.com>2021-08-17 23:50:00 -0400
committergeireann <geireann.lindfield@gmail.com>2021-08-17 23:50:00 -0400
commit9aa0e5e812dfbc67b0542c6740d43209313a37d6 (patch)
tree35f9d3f9403dedf1bcbe132b32986219ed7479be /src/client/views/pdf
parenta37a3a65cb314caaae41492c38d98a58c88e8a15 (diff)
more updates
Diffstat (limited to 'src/client/views/pdf')
-rw-r--r--src/client/views/pdf/AnchorMenu.tsx25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/client/views/pdf/AnchorMenu.tsx b/src/client/views/pdf/AnchorMenu.tsx
index 55816ed52..d098791e5 100644
--- a/src/client/views/pdf/AnchorMenu.tsx
+++ b/src/client/views/pdf/AnchorMenu.tsx
@@ -46,6 +46,7 @@ export class AnchorMenu extends AntimodeMenu<AntimodeMenuProps> {
@observable public Status: "marquee" | "annotation" | "" = "";
public OnClick: (e: PointerEvent) => void = unimplementedFunction;
+ public OnLink: (e: PointerEvent) => void = unimplementedFunction;
public StartDrag: (e: PointerEvent, ele: HTMLElement) => void = unimplementedFunction;
public Highlight: (color: string, isPushpin: boolean) => Opt<Doc> = (color: string, isPushpin: boolean) => undefined;
public GetAnchor: (savedAnnotations?: ObservableMap<number, HTMLDivElement[]>) => Opt<Doc> = () => undefined;
@@ -65,7 +66,14 @@ export class AnchorMenu extends AntimodeMenu<AntimodeMenuProps> {
componentDidMount() {
this._disposer = reaction(() => SelectionManager.Views(),
- selected => AnchorMenu.Instance.fadeOut(true));
+ selected => {
+ AnchorMenu.Instance.fadeOut(true)
+ this._showLinkPopup = false;
+ });
+ }
+
+ componentWillUnmount() {
+ console.log("unmount");
}
pointerDown = (e: React.PointerEvent) => {
@@ -145,14 +153,13 @@ export class AnchorMenu extends AntimodeMenu<AntimodeMenuProps> {
<FontAwesomeIcon icon="comment-alt" size="lg" />
</button>
</Tooltip>,
-
- //NOTE: link popup is currently incomplete
- // <Tooltip key="link" title={<div className="dash-tooltip">{"Link selected text to document or URL"}</div>}>
- // <button className="antimodeMenu-button link" onPointerDown={this.toggleLinkPopup} style={{}}>
- // <FontAwesomeIcon icon="link" size="lg" />
- // </button>
- // </Tooltip>,
- // <LinkPopup showPopup={this._showLinkPopup} />
+ //NOTE: link popup is currently in progress
+ <Tooltip key="link" title={<div className="dash-tooltip">{"Link selected text to document or URL"}</div>}>
+ <button className="antimodeMenu-button link" onPointerDown={this.toggleLinkPopup} style={{}}>
+ <FontAwesomeIcon icon="link" size="lg" />
+ </button>
+ </Tooltip>,
+ <LinkPopup showPopup={this._showLinkPopup}/>
] : [
<Tooltip key="trash" title={<div className="dash-tooltip">{"Remove Link Anchor"}</div>}>
<button className="antimodeMenu-button" onPointerDown={this.Delete}>