Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
encyclopedia-gui
Commits
46184a0a
Commit
46184a0a
authored
Jul 10, 2020
by
Lauri Himanen
Browse files
Fixed issue with band gap data summary.
parent
99af6dbf
Pipeline
#78273
skipped with stage
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
client/bundle.js
View file @
46184a0a
This diff is collapsed.
Click to expand it.
client/src/material-mod/ElectronicStructDetails.view.js
View file @
46184a0a
...
...
@@ -158,7 +158,6 @@ class ElectronicStructDetails extends DetailsViewBase {
this
.
summaryByFunctionals
=
null
;
this
.
summaryBox
=
this
.
element
.
querySelector
(
'
.summary-box
'
);
this
.
summaryBox
.
style
.
visibility
=
"
hidden
"
;
this
.
summaryByFunctionals
=
new
SummaryByFunctionalsComponent
(
this
.
summaryBox
);
this
.
bsDosPlotter
=
new
BSDOSPlotter
();
...
...
@@ -378,8 +377,7 @@ class SummaryByFunctionalsComponent{
this
.
bandgapField
=
this
.
hostElement
.
querySelector
(
'
.summary-bandgap-field
'
);
this
.
statsViewer
=
new
StatsViewer
();
let
chartsPlaceholder
=
this
.
hostElement
.
querySelector
(
'
.charts-placeholder
'
);
this
.
statsViewer
.
attach
(
chartsPlaceholder
,
250
,
150
);
this
.
chartsPlaceholder
=
this
.
hostElement
.
querySelector
(
'
.charts-placeholder
'
);
this
.
chartTab
.
addEventListener
(
"
click
"
,
e
=>
{
this
.
chartTab
.
style
.
fill
=
'
#777
'
;
...
...
@@ -398,10 +396,11 @@ class SummaryByFunctionalsComponent{
});
this
.
functionalTabs
.
addEventListener
(
"
click
"
,
e
=>
{
if
(
e
.
target
.
className
===
'
tab
'
){
if
(
e
.
target
.
className
===
'
tab
'
)
{
this
.
functionalTabs
.
querySelector
(
'
[data-tab="
'
+
this
.
functional
+
'
"]
'
)
.
className
=
'
tab
'
;
this
.
functional
=
e
.
target
.
getAttribute
(
'
data-tab
'
);
console
.
log
(
this
.
functional
);
this
.
functionalTabs
.
querySelector
(
'
[data-tab="
'
+
this
.
functional
+
'
"]
'
)
.
className
=
'
tab-selected
'
;
this
.
_setData
();
...
...
@@ -426,10 +425,14 @@ class SummaryByFunctionalsComponent{
let
results
=
JSON
.
parse
(
e3
.
target
.
response
);
let
stats
=
results
.
band_gap
;
if
(
stats
===
undefined
)
{
this
.
hostElement
.
style
.
visibility
=
"
hidden
"
;
this
.
bandgapField
.
innerHTML
=
"
No band gap data available
"
;
this
.
statsViewer
.
clear
();
this
.
chartsPlaceholder
.
textContent
=
"
No band gap data available
"
;
return
;
}
else
{
this
.
chartsPlaceholder
.
textContent
=
""
;
this
.
statsViewer
.
attach
(
this
.
chartsPlaceholder
,
250
,
150
);
}
this
.
hostElement
.
style
.
visibility
=
"
visible
"
;
// Unit conversion
stats
.
min
*=
6.241509e18
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment