aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/HistogramBox.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-03-26 16:44:53 -0400
committerbob <bcz@cs.brown.edu>2019-03-26 16:44:53 -0400
commit92aaac7cd78b9287d7f6ee85e73b3cad1c42d80c (patch)
treeacd1b0dfe042fdfdfeba8628cf9617fd01129d42 /src/client/views/nodes/HistogramBox.tsx
parent9f585c4f0a8287951f142f99dcc54861cb348728 (diff)
fixed histos in docking pane and not selecting bars when dragging.
Diffstat (limited to 'src/client/views/nodes/HistogramBox.tsx')
-rw-r--r--src/client/views/nodes/HistogramBox.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/HistogramBox.tsx b/src/client/views/nodes/HistogramBox.tsx
index 20a022227..4d7922c1b 100644
--- a/src/client/views/nodes/HistogramBox.tsx
+++ b/src/client/views/nodes/HistogramBox.tsx
@@ -150,10 +150,12 @@ export class HistogramBox extends React.Component<FieldViewProps> {
let label = this.HistoOp && this.HistoOp.X ? this.HistoOp.X.AttributeModel.DisplayName : "<...>";
let xaxislines = this.xaxislines;
let yaxislines = this.yaxislines;
+ var h = this.props.isTopMost ? this._panelHeight : this.props.doc.GetNumber(KeyStore.Height, 0);
+ var w = this.props.isTopMost ? this._panelWidth : this.props.doc.GetNumber(KeyStore.Width, 0);
return (
<Measure onResize={(r: any) => runInAction(() => { this._panelWidth = r.entry.width; this._panelHeight = r.entry.height })}>
{({ measureRef }) =>
- <div className="histogrambox-container" ref={measureRef} style={{ transform: `translate(${-this.props.doc.GetNumber(KeyStore.Width, 0) / 2}px, ${-this.props.doc.GetNumber(KeyStore.Height, 0) / 2}px)` }}>
+ <div className="histogrambox-container" ref={measureRef} style={{ transform: `translate(${-w / 2}px, ${-h / 2}px)` }}>
{xaxislines}
{yaxislines}
<HistogramBoxPrimitives HistoBox={this} />