diff options
author | eperelm2 <emily_perelman@brown.edu> | 2023-07-18 11:40:12 -0400 |
---|---|---|
committer | eperelm2 <emily_perelman@brown.edu> | 2023-07-18 11:40:12 -0400 |
commit | 5100a643fb0d98b6dd738e7024f4fe15f56ba1a8 (patch) | |
tree | 92fa39d2d5cc8f584e3346c8fe0efaa5b184a9e5 /src/client/views/nodes/DataVizBox/DataVizBox.tsx | |
parent | c9779f31d9ce2363e61c3c9fa7e3446203622dde (diff) | |
parent | 16a1b7de3ec26187b3a426eb037a5e4f4b9fcc55 (diff) |
Merge branch 'master' into secondpropertiesmenu-emily
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DataVizBox.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DataVizBox.tsx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx index 0fe24fe8d..d548ab9f1 100644 --- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx +++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx @@ -71,13 +71,14 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { }; getAnchor = (addAsAnnotation?: boolean, pinProps?: PinProps) => { - const anchor = - this._chartRenderer?.getAnchor(pinProps) ?? - Docs.Create.ConfigDocument({ - // when we clear selection -> we should have it so chartBox getAnchor returns undefined - // this is for when we want the whole doc (so when the chartBox getAnchor returns without a marker) - /*put in some options*/ - }); + const anchor = !pinProps + ? this.rootDoc + : this._chartRenderer?.getAnchor(pinProps) ?? + Docs.Create.ConfigDocument({ + // when we clear selection -> we should have it so chartBox getAnchor returns undefined + // this is for when we want the whole doc (so when the chartBox getAnchor returns without a marker) + /*put in some options*/ + }); anchor.presDataVizView = this.dataVizView; anchor.presDataVizAxes = this.axes.length ? new List<string>(this.axes) : undefined; |