diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2015-04-04 01:51:42 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2015-04-04 01:51:42 +0200 |
commit | e1034b7f47f5ab23116962edab2ca819d4ece144 (patch) | |
tree | 63493a6e57d07944af39e3f273b6d7e3de81a6a0 | |
parent | 694d52bc57adc19ee13047dce213d469d07070aa (diff) |
Fix face-palm of ping.js
-rw-r--r-- | web/nms.gathering.org/ping.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/web/nms.gathering.org/ping.js b/web/nms.gathering.org/ping.js index 6b6f12d..7c5de57 100644 --- a/web/nms.gathering.org/ping.js +++ b/web/nms.gathering.org/ping.js @@ -67,11 +67,10 @@ function draw_switches(json) { function create_linknet(linknetnum, switch1, switch2) { var s1 = switches[switch1]; var s2 = switches[switch2]; - var s1x = parseInt(s1.style.left.replace("px", "")) + 0.5 * parseInt(s1.style.width.replace("px", "")); var s1y = parseInt(s1.style.top.replace("px", "")) + 0.5 * parseInt(s1.style.height.replace("px", "")); var s2x = parseInt(s2.style.left.replace("px", "")) + 0.5 * parseInt(s2.style.width.replace("px", "")); - var s2y = parseInt(s2.style.top.replace("px", "")) + 0.5 * parseInt(s2.style.width.replace("px", "")); + var s2y = parseInt(s2.style.top.replace("px", "")) + 0.5 * parseInt(s2.style.height.replace("px", "")); var midx = 0.5 * (s1x + s2x); var midy = 0.5 * (s1y + s2y); |