diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-14 20:01:11 -0400 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-14 20:01:11 -0400 |
| commit | b7fc5faed0fc999d9c093357f94b97d611c02af3 (patch) | |
| tree | 8e988cb937c19a781928859b1a019138caab25c4 /src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts | |
| parent | 1ae0370e6a116404085f6864c8b644fcde80f460 (diff) | |
| parent | 8d03f27dc28e3d0ed8bb0a86339fec18ee56ef38 (diff) | |
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web
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, |
