aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/DataVizBox.tsx
diff options
context:
space:
mode:
authorsrichman333 <sarah_n_richman@brown.edu>2023-07-06 14:34:41 -0400
committersrichman333 <sarah_n_richman@brown.edu>2023-07-06 14:34:41 -0400
commit7aa9c94d3033c616e61b7406573d3c7ca5ce7909 (patch)
tree5701f0c1fa53cfb7994b4d7846493c140eec1901 /src/client/views/nodes/DataVizBox/DataVizBox.tsx
parenta5294e6ba7fcf82eb3d22c0c187ce351ee698ce5 (diff)
parente4ad92e7300ee7844a514379c8a01d0f01cb3a59 (diff)
Merge branch 'master' into data-visualization-sarah
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DataVizBox.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/DataVizBox.tsx15
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 38edf2dd9..b8a448e46 100644
--- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx
+++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
@@ -73,13 +73,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;