From eed87142a0a77ff3a7e2a35c299db94331ec0418 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Apr 2014 18:53:40 +0200 Subject: Let the ping script respect z-order. --- web/nms.gathering.org/ping.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'web/nms.gathering.org/ping.js') diff --git a/web/nms.gathering.org/ping.js b/web/nms.gathering.org/ping.js index 1299567..d19671e 100644 --- a/web/nms.gathering.org/ping.js +++ b/web/nms.gathering.org/ping.js @@ -40,6 +40,7 @@ function draw_switches(json) { s['sysname'], parseInt(s['x']), parseInt(s['y']), + parseInt(s['zorder']), parseInt(s['width']), parseInt(s['height'])); } @@ -69,7 +70,7 @@ function really_update_ping(json) { } } -function create_switch(switchnum, sysname, x, y, width, height) { +function create_switch(switchnum, sysname, x, y, zorder, width, height) { var s = document.createElement("div"); var map = document.getElementById('map'); var top_offset = map.getBoundingClientRect().top; @@ -83,6 +84,7 @@ function create_switch(switchnum, sysname, x, y, width, height) { s.style.backgroundColor = '#0000ff'; s.style.border = '1px solid black'; s.style.padding = "0"; + s.style.zIndex = zorder + 100; switches[switchnum] = s; var span = document.createElement("div"); -- cgit v1.2.3