diff options
author | root <root@frank.tg14.gathering.org> | 2014-04-15 03:21:37 +0200 |
---|---|---|
committer | root <root@frank.tg14.gathering.org> | 2014-04-15 03:21:37 +0200 |
commit | 05d680f49ab2aa64fd309855fdb4316e8a34f5c4 (patch) | |
tree | 7832ca6c11791f79d43dadec81040bd3e78b4821 | |
parent | 571101aadda3ff60506d30410632749a340e9068 (diff) |
Better rotation on the HTML5 ping graph.
-rw-r--r-- | web/nms.gathering.org/ping.html | 10 | ||||
-rw-r--r-- | web/nms.gathering.org/ping.js | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/web/nms.gathering.org/ping.html b/web/nms.gathering.org/ping.html index 51c6f52..c9441ba 100644 --- a/web/nms.gathering.org/ping.html +++ b/web/nms.gathering.org/ping.html @@ -2,15 +2,17 @@ <body> <style> .switchname { + position: absolute; + font-family: sans-serif; + font-size: small; + white-space: nowrap; +} +.rot { -webkit-transform: rotate(-90deg); -webkit-transform-origin: 0% 0%; transform: rotate(-90deg); transform-origin: 0% 0%; - position: absolute; bottom: -14px; - font-family: sans-serif; - font-size: small; - white-space: nowrap; } </style> <p id="playground"><img src="tg14-salkart.png" alt="" id="map" /></p> diff --git a/web/nms.gathering.org/ping.js b/web/nms.gathering.org/ping.js index d19671e..4189573 100644 --- a/web/nms.gathering.org/ping.js +++ b/web/nms.gathering.org/ping.js @@ -89,6 +89,9 @@ function create_switch(switchnum, sysname, x, y, zorder, width, height) { var span = document.createElement("div"); span.className = "switchname"; + if (width < 1.5 * height) { + span.className = "switchname rot"; + } span.style.border = "0"; span.style.padding = "0"; s.appendChild(span); |