Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
d58a8426
Commit
d58a8426
authored
Feb 12, 2018
by
Piotr Gawron
Browse files
open legend always on top
parent
3b2ce9e8
Pipeline
#3367
passed with stage
in 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/gui/Legend.js
View file @
d58a8426
"
use strict
"
;
/* exported logger */
var
AbstractGuiElement
=
require
(
'
./AbstractGuiElement
'
);
var
ConfigurationType
=
require
(
'
../ConfigurationType
'
);
var
Functions
=
require
(
'
../Functions
'
);
var
PanelControlElementType
=
require
(
'
./PanelControlElementType
'
);
// noinspection JSUnusedLocalSymbols
var
logger
=
require
(
'
../logger
'
);
function
Legend
(
params
)
{
...
...
@@ -24,14 +23,14 @@ Legend.prototype._initializeGui = function () {
var
legendDiv
=
Functions
.
createElement
({
type
:
"
div
"
,
id
:
"
legend-div
"
,
className
:
"
carousel slide
"
,
className
:
"
carousel slide
"
});
self
.
getElement
().
appendChild
(
legendDiv
);
var
indicators
=
Functions
.
createElement
({
type
:
"
ol
"
,
name
:
"
indicators
"
,
className
:
"
carousel-indicators
"
,
className
:
"
carousel-indicators
"
});
legendDiv
.
appendChild
(
indicators
);
self
.
setControlElement
(
PanelControlElementType
.
LEGEND_INDICATORS_OL
,
indicators
);
...
...
@@ -40,7 +39,7 @@ Legend.prototype._initializeGui = function () {
type
:
"
div
"
,
name
:
"
slides
"
,
className
:
"
carousel-inner
"
,
role
:
"
listbox
"
,
role
:
"
listbox
"
});
legendDiv
.
appendChild
(
slidesDiv
);
self
.
setControlElement
(
PanelControlElementType
.
LEGEND_SLIDES_DIV
,
slidesDiv
);
...
...
@@ -74,7 +73,15 @@ Legend.prototype.hide = function () {
this
.
getElement
().
style
.
display
=
"
none
"
;
};
Legend
.
prototype
.
show
=
function
()
{
var
maxZIndex
=
Math
.
max
.
apply
(
null
,
$
.
map
(
$
(
'
body *
'
),
function
(
e
,
n
)
{
if
(
$
(
e
).
css
(
'
position
'
)
!==
'
static
'
)
{
return
parseInt
(
$
(
e
).
css
(
'
z-index
'
))
||
1
;
}
}));
this
.
getElement
().
style
.
display
=
"
block
"
;
$
(
this
.
getElement
()).
css
(
'
z-index
'
,
maxZIndex
+
1
);
};
function
createLegendIndicator
(
file
,
index
)
{
...
...
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