forked from enviPath/enviPy
[Feature] PEPPER in enviPath (#332)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#332
This commit is contained in:
@ -161,8 +161,18 @@ document.addEventListener("alpine:init", () => {
|
||||
set value(v) {
|
||||
this.data[this.fieldName] = v;
|
||||
},
|
||||
get multiple() {
|
||||
return !!(this.fieldSchema.items && this.fieldSchema.items.enum);
|
||||
|
||||
},
|
||||
get options() {
|
||||
return this.fieldSchema.enum || [];
|
||||
if (this.fieldSchema.enum) {
|
||||
return this.fieldSchema.enum;
|
||||
} else if (this.fieldSchema.items && this.fieldSchema.items.enum) {
|
||||
return this.fieldSchema.items.enum;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
@ -453,6 +453,29 @@ function draw(pathway, elem) {
|
||||
}
|
||||
}
|
||||
|
||||
if (predictedPropertyViewEnabled) {
|
||||
|
||||
var tempContent = "";
|
||||
|
||||
if (Object.keys(n.predicted_properties).length > 0) {
|
||||
|
||||
if ("PepperPrediction" in n.predicted_properties) {
|
||||
// TODO needs to be generic once we store it as AddInf
|
||||
for (var s of n.predicted_properties["PepperPrediction"]) {
|
||||
if (s["mean"] != null) {
|
||||
tempContent += "<b>DT50 predicted via Pepper:</b> " + s["mean"].toFixed(2) + "<br>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tempContent === "") {
|
||||
tempContent = "<b>No predicted properties for this Node</b><br>";
|
||||
}
|
||||
|
||||
popupContent += tempContent
|
||||
}
|
||||
|
||||
popupContent += "<img src='" + n.image + "'><br>"
|
||||
if (n.scenarios.length > 0) {
|
||||
popupContent += '<b>Half-lives and related scenarios:</b><br>'
|
||||
@ -473,7 +496,6 @@ function draw(pathway, elem) {
|
||||
popupContent = "<a href='" + e.url + "'>" + e.name + "</a><br><br>";
|
||||
|
||||
if (e.reaction.rules) {
|
||||
console.log(e.reaction.rules);
|
||||
for (var rule of e.reaction.rules) {
|
||||
popupContent += "Rule <a href='" + rule.url + "'>" + rule.name + "</a><br>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user