Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
encyclopedia-gui
Commits
441bb5f8
Commit
441bb5f8
authored
Jun 22, 2018
by
Iker Hurtado
Browse files
Y axis labels improvement in combined electronic structure diagrams (Issue 97)
parent
4fc694a4
Pipeline
#31642
passed with stages
in 5 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
client/bundle.js
View file @
441bb5f8
...
...
@@ -3842,6 +3842,16 @@
}
setExternalYAxisMax
(
externalYAxisMax
){
this
.
externalYAxisMax
=
externalYAxisMax
;
}
getYAxisMax
(){
return
this
.
yAxisMax
;
}
repaint
(){
// repaint Y axis
this
.
_resetYAxisLabelGroup
();
...
...
@@ -3852,6 +3862,8 @@
let
min
=
Math
.
floor
(
this
.
yMin
/
yLabelGap
)
*
yLabelGap
;
let
max
=
Math
.
ceil
(
this
.
yMax
/
yLabelGap
)
*
yLabelGap
;
this
.
yAxisMax
=
max
;
if
(
this
.
externalYAxisMax
!==
undefined
)
max
=
this
.
externalYAxisMax
;
if
(
this
.
yLabelText
!==
null
)
{
for
(
let
i
=
min
;
i
<
max
+
1
;
i
=
i
+
yLabelGap
)
{
...
...
@@ -6285,7 +6297,7 @@
*/
/*
Implements a graphical UI component composed of a DOS plotter and a
Implements a graphical UI component composed of a DOS plotter and a
Band Structure plotter
*/
...
...
@@ -6357,6 +6369,8 @@
this
.
dosPlotter
.
setPoints
(
dosData
,
codeName
);
if
(
this
.
hasDispData
){
this
.
bsPlotter
.
setExternalYAxisMax
(
this
.
dosPlotter
.
getYAxisMax
());
this
.
dosPlotter
.
setRepaintListener
(
(
yZoom
,
yOffset
)
=>
{
this
.
bsPlotter
.
setYZoomAndOffset
(
yZoom
,
yOffset
);
this
.
bsPlotter
.
repaint
();
...
...
client/src/common/InteractivePlotterBase.js
View file @
441bb5f8
...
...
@@ -181,6 +181,16 @@ class InteractivePlotterBase{
}
setExternalYAxisMax
(
externalYAxisMax
){
this
.
externalYAxisMax
=
externalYAxisMax
;
}
getYAxisMax
(){
return
this
.
yAxisMax
;
}
repaint
(){
// repaint Y axis
this
.
_resetYAxisLabelGroup
();
...
...
@@ -191,6 +201,8 @@ class InteractivePlotterBase{
let
min
=
Math
.
floor
(
this
.
yMin
/
yLabelGap
)
*
yLabelGap
;
let
max
=
Math
.
ceil
(
this
.
yMax
/
yLabelGap
)
*
yLabelGap
;
this
.
yAxisMax
=
max
;
if
(
this
.
externalYAxisMax
!==
undefined
)
max
=
this
.
externalYAxisMax
;
if
(
this
.
yLabelText
!==
null
)
{
for
(
let
i
=
min
;
i
<
max
+
1
;
i
=
i
+
yLabelGap
)
{
...
...
client/src/material-mod/BSDOSPlotter.js
View file @
441bb5f8
...
...
@@ -17,7 +17,7 @@
*/
/*
Implements a graphical UI component composed of a DOS plotter and a
Implements a graphical UI component composed of a DOS plotter and a
Band Structure plotter
*/
...
...
@@ -89,6 +89,8 @@ class BSDOSPlotter{
this
.
dosPlotter
.
setPoints
(
dosData
,
codeName
);
if
(
this
.
hasDispData
){
this
.
bsPlotter
.
setExternalYAxisMax
(
this
.
dosPlotter
.
getYAxisMax
());
this
.
dosPlotter
.
setRepaintListener
(
(
yZoom
,
yOffset
)
=>
{
this
.
bsPlotter
.
setYZoomAndOffset
(
yZoom
,
yOffset
);
this
.
bsPlotter
.
repaint
();
...
...
Write
Preview
Markdown
is supported
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