Commit 356deb31 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Increased blur on popups.

parent 554064d6
enc-gui.iml
.vscode/
......@@ -2379,7 +2379,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_this7.folded = true;
_this7.foldBtn.src = util.IMAGE_DIR + 'folded.png';
_this7.foldingPanel.style.display = 'none';
}, 100);
}, 300);
});
//this.cellViewer.toggleLatticeParameters(false);
......@@ -4551,6 +4551,100 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
/* 23 */
/***/function (module, exports, __webpack_require__) {
<<<<<<< HEAD
=======
var util = __webpack_require__(0);
var SimilarityFinder = function () {
function SimilarityFinder() {
var _this21 = this;
_classCallCheck(this, SimilarityFinder);
this.folded = true;
this.element = document.createElement('span');
//this.element.className = className;
this.element.setAttribute("info-sys-data", "similar-materials");
this.element.style = "float : right; border: 2px solid #DDD; padding: 2px 2px 0px 3px;";
this.element.innerHTML += '\n <span style=" vertical-align: 30%;" ><b>Similar materials</b></span>\n <img style="cursor: pointer" src="' + util.IMAGE_DIR + 'folded.png" />\n\n <div class="vr-download-panel" style="position: relative; display: none;">\n\n </div>\n ';
// Focus related properties (in order to hide the box when the user click out)
this.element.tabIndex = '0'; // enabled the support of focusing
this.element.style.outline = 'none'; // The outline is not shown when it gains the focus
this.foldingPanel = this.element.querySelector('.vr-download-panel');
this.foldBtn = this.element.querySelector('img');
this.foldBtn.addEventListener('click', function (e) {
_this21.folded = !_this21.folded;
_this21.foldBtn.src = _this21.folded ? util.IMAGE_DIR + 'folded.png' : util.IMAGE_DIR + 'unfolded.png';
//this.foldBtn.className = (this.folded ? 'on' : 'off');
_this21.foldingPanel.style.display = _this21.folded ? 'none' : 'block';
});
this.element.addEventListener('blur', function (e) {
setTimeout(function () {
_this21.folded = true;
_this21.foldBtn.src = util.IMAGE_DIR + 'folded.png';
_this21.foldingPanel.style.display = 'none';
}, 300);
});
//this.cellViewer.toggleLatticeParameters(false);
}
_createClass(SimilarityFinder, [{
key: 'setSimilarityData',
value: function setSimilarityData(similarityData) {
var dataAsArray = Object.keys(similarityData).map(function (key) {
return {
data: similarityData[key],
key: key
};
});
dataAsArray.sort(function (a, b) {
if (a.data.Tc < b.data.Tc) {
return 1;
} else if (a.data.Tc > b.data.Tc) {
return -1;
} else {
return 0;
}
});
var slicedData = dataAsArray.slice(0, 5);
var container = document.createElement('table');
container.setAttribute('class', 'similar-materials-panel-unfolded');
container.style = 'width: 230px; padding-left: 5px;';
this.foldingPanel.appendChild(container);
var sim_table_header = document.createElement('tr');
sim_table_header.style = "padding: 5px; ";
sim_table_header.innerHTML = '<th style = "text-align: left;">Formula (space group)</th><th>:</th><th style = "text-align: left;">Tc</th>';
container.appendChild(sim_table_header);
slicedData.forEach(function (item) {
var material_id = item.key.split(':')[0];
var element = document.createElement('tr');
element.style = "padding: 5px; font-family: 'Arimo', sans-serif; font-size: 10pt; ";
var url = window.location.toString().replace(/#.*$/, "") + '#/material/' + material_id;
element.innerHTML = '<td><a href="' + url + '" target="_' + material_id + '" style="color:#777; font-family: \'Arimo\', sans-serif; font-size: 10pt;">' + util.getSubscriptedFormula(item.data.formula) + ' (' + item.data.space_group_number + ')</a></td><td>:</td> <td>' + item.data.Tc.toPrecision(3) + '</td>';
container.appendChild(element);
});
}
}]);
return SimilarityFinder;
}(); // class DropDown
module.exports = { SimilarityFinder: SimilarityFinder };
/***/
},
/* 24 */
/***/function (module, exports, __webpack_require__) {
>>>>>>> 6f076b65... Increased the blur delay on popups.
"use strict";
/**
......
......@@ -2064,11 +2064,11 @@ let svg = __webpack_require__(2);
let util = __webpack_require__(0);
let NavTree = __webpack_require__(20);
let Overview = __webpack_require__(21);
let StructureDetails = __webpack_require__(23);
let ElectronicStructDetails = __webpack_require__(25);
let MethodologyDetails = __webpack_require__(27);
let ThermalPropsDetails = __webpack_require__(29);
let ElasticConstDetails = __webpack_require__(32);
let StructureDetails = __webpack_require__(24);
let ElectronicStructDetails = __webpack_require__(26);
let MethodologyDetails = __webpack_require__(28);
let ThermalPropsDetails = __webpack_require__(30);
let ElasticConstDetails = __webpack_require__(33);
let DataStore = __webpack_require__(1);
let LoadingPopup = __webpack_require__(4);
......@@ -2267,8 +2267,10 @@ class MaterialMod{
this.thermalDetails.setMaterialData();
this.elasticDetails.setMaterialData();
//console.log("MATDATA LOADED: ");
if (this.structureViewer !== null)
if (this.structureViewer !== null) {
this.structureViewer.load(util.getCellDataForViewer(materialData));
this.structureViewer.setMaterialId(materialData.id);
}
util.serverReq(util.getMaterialXsURL('calculations',matId), e4 => {
DataStore.setCalculations(JSON.parse(e4.target.response).results);
......@@ -2377,6 +2379,7 @@ class StructureViewerWrapper{
}
setMaterialId(id){
console.log('pass material id ' + id)
this.vrDropDown.setMaterialId(id);
}
......@@ -2474,7 +2477,7 @@ class DropDown{
this.folded = true;
this.foldBtn.src = util.IMAGE_DIR+'folded.png';
this.foldingPanel.style.display = 'none';
}, 100);
}, 300);
});
//this.cellViewer.toggleLatticeParameters(false);
......@@ -3224,7 +3227,7 @@ let FlaggingFormPopup = __webpack_require__(17);
let PubSub = __webpack_require__(18);
let Router = __webpack_require__(19);
let MaterialMod = __webpack_require__(9);
let SearchModule = __webpack_require__(33);
let SearchModule = __webpack_require__(34);
let UserGuidance = __webpack_require__(14);
let DataStore = __webpack_require__(1);
......@@ -4960,7 +4963,8 @@ module.exports = SwitchComponent;
/***/ }),
/* 23 */
/* 23 */,
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......@@ -5001,7 +5005,7 @@ let util = __webpack_require__(0);
let InfoSys = __webpack_require__(3);
let CalcSelectorBar = __webpack_require__(12);
let StatsViewer = __webpack_require__(13);
let EquationOfStateViewer = __webpack_require__(24);
let EquationOfStateViewer = __webpack_require__(25);
let DataStore = __webpack_require__(1);
let LoadingPopup = __webpack_require__(4);
......@@ -5811,7 +5815,7 @@ module.exports = StructureDetails;
/***/ }),
/* 24 */
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......@@ -5963,7 +5967,7 @@ module.exports = EquationOfStateViewer;
/***/ }),
/* 25 */
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......@@ -6004,7 +6008,7 @@ let util = __webpack_require__(0);
let InfoSys = __webpack_require__(3);
let CalcSelectorBar = __webpack_require__(12);
let StatsViewer = __webpack_require__(13);
let BSDOSPlotter = __webpack_require__(26);
let BSDOSPlotter = __webpack_require__(27);
let PlotterBase = __webpack_require__(5);
let plotter= new PlotterBase();
let DataStore = __webpack_require__(1);
......@@ -6539,7 +6543,7 @@ module.exports = ElectronicStructDetails;
/***/ }),
/* 26 */
/* 27 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -6664,7 +6668,7 @@ module.exports = BSDOSPlotter;
/***/ }),
/* 27 */
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......@@ -6701,7 +6705,7 @@ let DetailsViewBase = __webpack_require__(6);
let util = __webpack_require__(0);
let InfoSys = __webpack_require__(3);
let DataStore = __webpack_require__(1);
let SortingButton = __webpack_require__(28);
let SortingButton = __webpack_require__(29);
const REPOSITORY_LINK =
......@@ -7233,7 +7237,7 @@ module.exports = MethodologyDetails;
/***/ }),
/* 28 */
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -7303,7 +7307,7 @@ module.exports = SortingButton;
/***/ }),
/* 29 */
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......@@ -7339,8 +7343,8 @@ let DataStore = __webpack_require__(1);
let LoadingPopup = __webpack_require__(4);
let HeatCapPlotter = __webpack_require__(11);
let HelmholtzPlotter = __webpack_require__(30);
let PhononDispDOSPlotter = __webpack_require__(31);
let HelmholtzPlotter = __webpack_require__(31);
let PhononDispDOSPlotter = __webpack_require__(32);
class ThermalPropsDetails extends DetailsViewBase{
......@@ -7521,7 +7525,7 @@ module.exports = ThermalPropsDetails;
/***/ }),
/* 30 */
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......@@ -7594,7 +7598,7 @@ module.exports = HelmholtzPlotter;
/***/ }),
/* 31 */
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -7781,7 +7785,7 @@ module.exports = PhononDispDOSPlotter;
/***/ }),
/* 32 */
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......@@ -7891,7 +7895,7 @@ module.exports = ElasticConstDetails;
/***/ }),
/* 33 */
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......@@ -7924,9 +7928,9 @@ module.exports = ElasticConstDetails;
let util = __webpack_require__(0);
let UserGuidance = __webpack_require__(14);
let ElementTable = __webpack_require__(34);
let MaterialList = __webpack_require__(35);
let PropertiesBox = __webpack_require__(36);
let ElementTable = __webpack_require__(35);
let MaterialList = __webpack_require__(36);
let PropertiesBox = __webpack_require__(37);
// local utility functions
......@@ -8377,7 +8381,7 @@ module.exports = SearchMod;
/***/ }),
/* 34 */
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......@@ -8771,7 +8775,7 @@ module.exports = ElemenTable;
/***/ }),
/* 35 */
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......@@ -9051,7 +9055,7 @@ module.exports = MaterialList;
/***/ }),
/* 36 */
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
......
......@@ -445,7 +445,7 @@ class DropDown{
this.folded = true;
this.foldBtn.src = util.IMAGE_DIR+'folded.png';
this.foldingPanel.style.display = 'none';
}, 100);
}, 300);
});
//this.cellViewer.toggleLatticeParameters(false);
......
Markdown is supported
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