Skip to content
Snippets Groups Projects
Commit 4283ee4b authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '263-legend-should-be-on-top-of-every-submap' into 'master'

Resolve "Legend should be on top of every submap"

Closes #263

See merge request piotr.gawron/minerva!189
parents 3b2ce9e8 d58a8426
No related branches found
No related tags found
1 merge request!189Resolve "Legend should be on top of every submap"
Pipeline #
"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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment