Commit 7c273bcf authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Fixed layout issues.

parent 46184a0a
Pipeline #78275 skipped with stage
This diff is collapsed.
......@@ -191,6 +191,9 @@ class MaterialMod {
if (!isReady()) {
this.structureViewer.axisCheckbox.checked = true;
this.structureViewer.bondsCheckbox.checked = true;
document.getElementById('methodology-ov').style.visibility = 'hidden';
document.getElementById('structure-ov').style.visibility = 'hidden';
document.getElementById('e-structure-ov').style.visibility = 'hidden';
// Request basic material data
LoadingPopup.show("load_basic");
......@@ -216,6 +219,8 @@ class MaterialMod {
LoadingPopup.show("load_idealized");
util.serverReqPOST(util.getMaterialCalcURL(matId, idealId), query, e2 => {
materialData.idealized_structure = JSON.parse(e2.target.response).idealized_structure;
document.getElementById('structure-ov').style.visibility = 'visible';
document.getElementById('methodology-ov').style.visibility = 'visible';
isReady();
LoadingPopup.hide("load_idealized");
});
......
......@@ -125,7 +125,7 @@ class Overview {
<div style="float: right; width: 60%;">
<div id="e-structure-ov" class="view-box" style="display: none"> <!--style="height: 610px; "-->
<div id="e-structure-ov" class="view-box" style="display: block">
<div class="title">Electronic structure
<img style="float: right" class="to-detail" src="img/more.svg" />
<div style="clear: both;"></div>
......@@ -388,7 +388,6 @@ class Overview {
if (this.isLoaded(calcWithBS !== undefined, calcWithDOS !== undefined, calcWithHeat !== undefined)) {
return;
}
console.log("LOADING");
this.calcMaterialId = matData.material_id;
this.bsLoaded = false;
this.dosLoaded = false;
......@@ -431,30 +430,42 @@ class Overview {
}
// Add list of functionals
let functionalHTML= '';
this.functional.textContent = "";
let container = document.createElement("div");
functionalMap.forEach((number, functional) => {
functionalHTML+= '<span info-sys-data="functional-type.value:'+functional+
'">'+number+' '+functional+'</span> <br> ';
let span = document.createElement("span");
span.setAttribute("info-sys-data", "functional-type.value:" + functional);
span.textContent = number + ' ' + functional;
container.appendChild(span);
let linebreak = document.createElement("br");
container.appendChild(linebreak);
});
this.functional.innerHTML= functionalHTML;
this.functional.append(container);
InfoSys.addToInfoSystem(this.functional);
// Add list of codes
let codeHTML= '';
//// Add list of codes
this.code.textContent = "";
let container2 = document.createElement("div");
codeMap.forEach((number, codeName) => {
codeHTML+= '<span info-sys-data="code-name.value:'+codeName+
'">'+number+' '+codeName+'</span> <br> ';
let span = document.createElement("span");
span.setAttribute("info-sys-data", "code-name.value:" + codeName);
span.textContent = number + ' ' + codeName;
container2.appendChild(span);
let linebreak = document.createElement("br");
container2.appendChild(linebreak);
});
this.code.innerHTML = codeHTML;
this.code.append(container2);
InfoSys.addToInfoSystem(this.code);
if (calcWithBS === undefined && calcWithDOS === undefined) {
document.getElementById('e-structure-ov').style.display = 'none';
DataStore.hasElecStructureData = false;
} else {
document.getElementById('e-structure-ov').style.display = 'block';
let isReady = () => {
if (this.dosLoaded && this.bsLoaded) {
document.getElementById('e-structure-ov').style.visibility = 'visible';
}
};
DataStore.hasElecStructureData = true;
if (this.bandPlotter === null){
......@@ -482,6 +493,7 @@ class Overview {
if (bandStructData.section_k_band_segment[0].band_energies.length === 2)
this.spinLegend.style.display = 'block';
this.bsLoaded = true;
isReady();
}
LoadingPopup.hide("overview_electronic_band_structure");
});
......@@ -503,6 +515,7 @@ class Overview {
if (dosData.dos_values.length === 2)
this.spinLegend.style.display = 'block';
this.dosLoaded = true;
isReady();
}
LoadingPopup.hide("overview_electronic_dos");
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment