diff options
| author | Stanley <syip0810@gmail.com> | 2019-05-19 14:10:53 -0700 |
|---|---|---|
| committer | Stanley <syip0810@gmail.com> | 2019-05-19 14:10:53 -0700 |
| commit | eec769b586d4a1c6e73c4ce4ae78b4b8f2d4762b (patch) | |
| tree | 7218f2df63e028391e40a084d41bce72fd43e00c /src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts | |
| parent | 2cc62cd88688ccdec8275fcaaba939d448f9baf5 (diff) | |
| parent | 01a223f2e6685506cc1e5db69e9062d5ff0d3246 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into pdf_impl
Diffstat (limited to 'src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts')
| -rw-r--r-- | src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts b/src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts index 6291ec1fc..3e9145a1b 100644 --- a/src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts +++ b/src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts @@ -198,8 +198,8 @@ export class HistogramBinPrimitiveCollection { var marginParams = new MarginAggregateParameters(); marginParams.aggregateFunction = axis.AggregateFunction; var marginAggregateKey = ModelHelpers.CreateAggregateKey(this.histoOp.Schema!.distinctAttributeParameters, axis, this.histoResult, brush.brushIndex!, marginParams); - var marginResult = ModelHelpers.GetAggregateResult(bin, marginAggregateKey) as MarginAggregateResult; - return !marginResult ? 0 : marginResult.absolutMargin!; + let aggResult = ModelHelpers.GetAggregateResult(bin, marginAggregateKey); + return aggResult instanceof MarginAggregateResult && aggResult.absolutMargin ? aggResult.absolutMargin : 0; } private createBinPrimitive(barAxis: number, brush: Brush, marginRect: PIXIRectangle, |
