Skip to content

Commit

Permalink
moved
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz committed Jan 15, 2025
1 parent 6331c54 commit d30baaf
Showing 1 changed file with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,6 @@ qx.Class.define("osparc.vipMarket.VipMarket", {
},
},

statics: {
curateAnatomicalModels: function(anatomicalModelsRaw) {
const anatomicalModels = [];
const models = anatomicalModelsRaw["availableDownloads"];
models.forEach(model => {
const curatedModel = {};
Object.keys(model).forEach(key => {
if (key === "Features") {
let featuresRaw = model["Features"];
featuresRaw = featuresRaw.substring(1, featuresRaw.length-1); // remove brackets
featuresRaw = featuresRaw.split(","); // split the string by commas
const features = {};
featuresRaw.forEach(pair => { // each pair is "key: value"
const keyValue = pair.split(":");
features[keyValue[0].trim()] = keyValue[1].trim()
});
curatedModel["Features"] = features;
} else {
curatedModel[key] = model[key];
}
});
anatomicalModels.push(curatedModel);
});
return anatomicalModels;
},
},

members: {
__anatomicalModels: null,
__anatomicalModelsModel: null,
Expand Down

0 comments on commit d30baaf

Please sign in to comment.