Skip to content

Commit

Permalink
if(!m.inputType){m.inputType = qm.unitHelper.getInputType(unit.abbrev…
Browse files Browse the repository at this point in the history
…iatedName, m.valence, m.variableName);}
  • Loading branch information
mikepsinn committed Sep 20, 2020
1 parent f6ab23e commit e838bac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/js/qmHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4237,6 +4237,10 @@ var qm = {
src.startTimeString ||
src.startTimeEpoch;
var unit = qm.unitHelper.find(src);
var cat = qm.variableCategoryHelper.find(src);
if(!unit && cat){
unit = qm.unitHelper.find(cat);
}
var m = {
combinationOperation: src.combinationOperation || 'MEAN',
icon: src.icon,
Expand All @@ -4256,6 +4260,7 @@ var qm = {
variableCategoryName: src.variableCategoryName,
variableName: src.variableName || src.name,
}
if(!m.inputType){m.inputType = qm.unitHelper.getInputType(unit.abbreviatedName, m.valence, m.variableName);}
return m;
},
fromNotification: function (n){
Expand Down Expand Up @@ -9967,6 +9972,15 @@ var qm = {
}
return arr;
},
find: function(v) {
var nameOrId;
if(typeof v === "string" || v === parseInt(v, 10)){
nameOrId = v;
} else {
nameOrId = v.variableCategoryId || v.variableCategoryName;
}
return qm.variableCategoryHelper.getByNameOrId(nameOrId);
}
},
visualizer: {
visualizerEnabled: true,
Expand Down

0 comments on commit e838bac

Please sign in to comment.