diff options
author | Sophie Zhang <sophie_zhang@brown.edu> | 2023-07-27 13:23:42 -0400 |
---|---|---|
committer | Sophie Zhang <sophie_zhang@brown.edu> | 2023-07-27 13:23:42 -0400 |
commit | fec79d2b5b8feb361e489c9ee41ee720507d0806 (patch) | |
tree | fcb4378efe4fda3e05322561f25641c57d1f19d4 /src/client/views/nodes/WebBox.tsx | |
parent | 0ca5a86e6f9ff85a32de109105b241d613aae326 (diff) |
changes
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
-rw-r--r-- | src/client/views/nodes/WebBox.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 34a1229ba..5cdd6b5f2 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -354,6 +354,11 @@ export class WebBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps AnchorMenu.Instance.jumpTo(e.clientX * scale + mainContBounds.translateX, e.clientY * scale + mainContBounds.translateY - NumCast(this.layoutDoc._layout_scrollTop) * scale); // Changing which document to add the annotation to (the currently selected WebBox) GPTPopup.Instance.setSidebarId(`${this.props.fieldKey}_${this._urlHash}_sidebar`); + const anchor = this._getAnchor(undefined, false); + if (anchor) { + console.log(anchor); + GPTPopup.Instance.setTargetAnchor(anchor); + } GPTPopup.Instance.addDoc = this.sidebarAddDocument; } } |