aboutsummaryrefslogtreecommitdiff
path: root/src/client/northstar/model/ModelHelpers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/northstar/model/ModelHelpers.ts')
-rw-r--r--src/client/northstar/model/ModelHelpers.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/northstar/model/ModelHelpers.ts b/src/client/northstar/model/ModelHelpers.ts
index d0711fb69..ac807b41f 100644
--- a/src/client/northstar/model/ModelHelpers.ts
+++ b/src/client/northstar/model/ModelHelpers.ts
@@ -16,7 +16,7 @@ export class ModelHelpers {
public static CreateAggregateKey(distinctAttributeParameters: AttributeParameters | undefined, atm: AttributeTransformationModel, histogramResult: HistogramResult,
brushIndex: number, aggParameters?: SingleDimensionAggregateParameters): AggregateKey {
{
- if (aggParameters == undefined) {
+ if (aggParameters === undefined) {
aggParameters = ModelHelpers.GetAggregateParameter(distinctAttributeParameters, atm);
}
else {
@@ -64,7 +64,7 @@ export class ModelHelpers {
if (aggParams) {
aggregateParameters.push(aggParams);
- var margin = new MarginAggregateParameters()
+ var margin = new MarginAggregateParameters();
margin.aggregateFunction = agg.AggregateFunction;
margin.attributeParameters = ModelHelpers.GetAttributeParameters(agg.AttributeModel);
margin.distinctAttributeParameters = distinctAttributeParameters;
@@ -106,7 +106,7 @@ export class ModelHelpers {
{
rawName: am.CodeName,
visualizationHints: am.VisualizationHints,
- id: (am as BackendAttributeModel).Id
+ id: (am).Id
});
}
else if (am instanceof CodeAttributeModel) {
@@ -114,11 +114,11 @@ export class ModelHelpers {
{
rawName: am.CodeName,
visualizationHints: am.VisualizationHints,
- code: (am as CodeAttributeModel).Code
+ code: (am).Code
});
}
else {
- throw new Exception()
+ throw new Exception();
}
}
@@ -146,7 +146,7 @@ export class ModelHelpers {
}
public static GetAggregateResult(bin: Bin, aggregateKey: AggregateKey) {
- if (aggregateKey.aggregateParameterIndex == -1 || aggregateKey.brushIndex == -1) {
+ if (aggregateKey.aggregateParameterIndex === -1 || aggregateKey.brushIndex === -1) {
return null;
}
return bin.aggregateResults![aggregateKey.aggregateParameterIndex! * bin.ySize! + aggregateKey.brushIndex!];
@@ -157,9 +157,9 @@ export class ModelHelpers {
var ret = new Array<AggregateFunction>();
ret.push(AggregateFunction.None);
ret.push(AggregateFunction.Count);
- if (atm.AttributeModel.DataType == DataType.Float ||
- atm.AttributeModel.DataType == DataType.Double ||
- atm.AttributeModel.DataType == DataType.Int) {
+ if (atm.AttributeModel.DataType === DataType.Float ||
+ atm.AttributeModel.DataType === DataType.Double ||
+ atm.AttributeModel.DataType === DataType.Int) {
ret.push(AggregateFunction.Avg);
ret.push(AggregateFunction.Sum);
}