aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/nms-ui.js
blob: 48865c4edceb2804d15d15d6ffcd41b610d45dc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"use strict";


/*
 * The idea is to gradually move pure UI stuff into nmsUi.
 */
var nmsUi = nmsUi || {
	_active: "map"
};

nmsUi.setActive = function(pane) {
	var old = document.getElementById(nmsUi._active);
	var newp = document.getElementById(pane);
	old.style.display = "none";
	newp.style.display = "block";
	
	var oldlink = document.getElementById(nmsUi._active + "-link");
	var newlink = document.getElementById(pane + "-link");
	oldlink.classList.remove("active");
	newlink.classList.add("active");

	nmsUi._active = pane;
}

nmsUi.toggleVertical = function(x) {
	nms.vertical = !nms.vertical;
}