aboutsummaryrefslogtreecommitdiff
path: root/src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-03-29 14:37:26 -0400
committerbob <bcz@cs.brown.edu>2019-03-29 14:37:26 -0400
commitda7a12f9b49b43534658524b1da846948fbf3947 (patch)
tree25559e141c3b2c0540e3cd199e7eeda74377acda /src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx
parent1bd678851632bbbb302363574eb5e3e19dc343e9 (diff)
fixed some bugs added some small features to histograms.
Diffstat (limited to 'src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx')
-rw-r--r--src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx b/src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx
index d2f1be4fd..5e403eb9c 100644
--- a/src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx
+++ b/src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx
@@ -1,5 +1,5 @@
import React = require("react")
-import { computed, observable, runInAction } from "mobx";
+import { computed, observable, runInAction, reaction } from "mobx";
import { observer } from "mobx-react";
import { Utils as DashUtils } from '../../../Utils';
import { AttributeTransformationModel } from "../../northstar/core/attribute/AttributeTransformationModel";
@@ -19,6 +19,9 @@ import "./HistogramBoxPrimitives.scss";
export class HistogramBoxPrimitives extends React.Component<HistogramPrimitivesProps> {
private get histoOp() { return this.props.HistoBox.HistoOp; }
private get renderDimension() { return this.props.HistoBox.SizeConverter.RenderDimension; }
+ componentDidMount() {
+ reaction(() => this.props.HistoBox.HistogramResult, () => this._selectedPrims.length = 0);
+ }
@observable _selectedPrims: HistogramBinPrimitive[] = [];
@computed get xaxislines() { return this.renderGridLinesAndLabels(0); }
@computed get yaxislines() { return this.renderGridLinesAndLabels(1); }