-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfgmap_menu_debug.js
More file actions
48 lines (36 loc) · 1.05 KB
/
fgmap_menu_debug.js
File metadata and controls
48 lines (36 loc) · 1.05 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Debug menu
*
* Pigeon <pigeon at pigeond dot net>
*
* GPLv2, see LICENSE file for details
*/
function FGMapMenuDebug(fgmap, tabdiv) {
this.fgmap = fgmap;
this.tabdiv = tabdiv;
this.setup();
}
FGMapMenuDebug.prototype.setup = function() {
var elem = element_create(null, "div");
elem.style.className = "fgmap_debug";
elem.style.overflow = "hidden";
elem.style.width = "95%";
elem.style.height = "95%";
elem.style.padding = "0px";
elem.style.margin = "0px auto";
var debug = this.debug = element_create(elem, "textarea");
debug.style.width = "100%";
debug.style.height = "100%";
debug.style.padding = "0px";
debug.style.margin = "0px";
debug.rows = 10;
debug.readOnly = true;
this.tabdiv.tab_add("debug", "debug", elem, this, 100);
this.fgmap.debug_elem_set(this.debug);
dprint(this.fgmap, "FGMap debug ready...");
};
FGMapMenuDebug.prototype.remove = function() {
this.fgmap.debug_elem_set(null);
this.tabdiv.tab_remove("debug");
};
/* vim: set sw=4 sts=4 expandtab: */