aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/nms.gathering.org/ping.html10
-rw-r--r--web/nms.gathering.org/ping.js3
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);