Commit f625de42 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Fixed issue with structure loading in details page.

parent 1f6cce25
Pipeline #79026 skipped with stage
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,12 +2,12 @@ window.nomadEnv = {
//host: "https://labdev-nomad.esc.rzg.mpg.de/dev/nomad/encyclopedia-api/",
//path: "api/encyclopedia/",
//userCookieDomain: ".esc.rzg.mpg.de",
//host: "https://repository.nomad-coe.eu/app/",
//path: "api/encyclopedia/",
//userCookieDomain: ".repository.nomad-coe.eu",
host: "/",
path: "",
userCookieDomain: ".localhost",
host: "https://nomad-lab.eu/prod/rae/",
path: "api/encyclopedia/",
userCookieDomain: ".nomad-lab.eu",
//host: "/",
//path: "",
//userCookieDomain: ".localhost",
guestUserToken: 'eyJhbGciOiJIUzI1NiIsImlhdCI6MTUyMzg4MDE1OSwiZXhwIjoxNjgxNTYwMTU5fQ.ey'+
'JpZCI6ImVuY2d1aSJ9.MsMWQa3IklH7cQTxRaIRSF9q8D_2LD5Fs2-irpWPTp4'
};
......@@ -150,7 +150,6 @@ class MaterialMod {
if (this.currentDetailView !== null) {
this.currentDetailView.load();
if (view === util.MAT_VIEW.structure) {
this.structureViewer.load(idealizedStructure);
this._setCellViewer(this.structureDetails.vizBox);
}
if (view === util.MAT_VIEW.methodology) {
......@@ -162,7 +161,6 @@ class MaterialMod {
this.overview.setMaterialData();
let name = (materialData.material_name === null ? materialData.formula : materialData.material_name);
this.overview.setCalcsData(markedTreeLeafs);
this.structureViewer.load(idealizedStructure);
this._setCellViewer(this.overview.vizBox);
}
};
......@@ -209,8 +207,8 @@ class MaterialMod {
LoadingPopup.show("load_idealized");
util.serverReqPOST(util.getMaterialCalcURL(matId, idealId), query, e2 => {
let struct = JSON.parse(e2.target.response).idealized_structure;
console.log(struct);
DataStore.setIdealizedStructure(struct);
this.structureViewer.load(struct);
document.getElementById('structure-ov').style.visibility = 'visible';
document.getElementById('methodology-ov').style.visibility = 'visible';
isReady();
......
......@@ -174,6 +174,7 @@ class StructureDetails extends DetailsViewBase {
setMaterialData() {
let data = DataStore.getMaterialData();
let idealizedStructure = DataStore.getIdealizedStructure();
super.setMaterialData(data);
// Build the navigation tree and attach listeners
......@@ -218,8 +219,8 @@ class StructureDetails extends DetailsViewBase {
let wyckoffMap = new Map();
let valueSet= new Set();
for (var i = 0; i < data.idealized_structure.wyckoff_sets.length; i++) {
let wset = data.idealized_structure.wyckoff_sets[i];
for (var i = 0; i < idealizedStructure.wyckoff_sets.length; i++) {
let wset = idealizedStructure.wyckoff_sets[i];
let element = wset.element;
if (wyckoffMap.has(element)){
wyckoffMap.get(element).add(wset.wyckoff_letter);
......
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