fix #103: wifi icons wrap when scaling browser

pull/140/merge
Thorsten von Eicken 9 years ago
parent a770d0293d
commit bd40769138
  1. 6
      html/wifi/wifiSta.js

@ -14,15 +14,15 @@ function createInputForAp(ap) {
var bars = e("div"); var bars = e("div");
var rssiVal = -Math.floor(ap.rssi/51)*32; var rssiVal = -Math.floor(ap.rssi/51)*32;
bars.className = "lock-icon"; bars.className = "lock-icon";
bars.style.backgroundPosition = "0px "+rssiVal+"px"; bars.style.backgroundPosition = "0px "+(rssiVal-1)+"px";
var rssi = e("div"); var rssi = e("div");
rssi.innerHTML = "" + ap.rssi +"dB"; rssi.innerHTML = "" + ap.rssi +"dB";
var encrypt = e("div"); var encrypt = e("div");
var encVal = "-64"; //assume wpa/wpa2 var encVal = "-65"; //assume wpa/wpa2
if (ap.enc == "0") encVal = "0"; //open if (ap.enc == "0") encVal = "0"; //open
if (ap.enc == "1") encVal = "-32"; //wep if (ap.enc == "1") encVal = "-33"; //wep
encrypt.className = "lock-icon"; encrypt.className = "lock-icon";
encrypt.style.backgroundPosition = "-32px "+encVal+"px"; encrypt.style.backgroundPosition = "-32px "+encVal+"px";

Loading…
Cancel
Save