From 0dec63ced996b529d575106528da50aacaa74f19 Mon Sep 17 00:00:00 2001 From: cunimb Date: Mon, 11 Sep 2017 19:02:44 +0200 Subject: [PATCH] Changes to allow barograph to fit 90% of window size --- barogram.js | 3 +++ cunimb.css | 4 ++-- cunimb.js | 4 +++- index.php | 18 +++++++++--------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/barogram.js b/barogram.js index 587760f..3085515 100644 --- a/barogram.js +++ b/barogram.js @@ -89,16 +89,19 @@ function baro_Init() { Y_min = 0; baroCanvas = document.getElementById("div_baro"); + baroCanvas.height = parseInt(document.getElementById("dbaro").offsetHeight, 10); baroCtx = baroCanvas.getContext("2d"); baroCtx.fillStyle = "#808080"; // color of text baroCtx.font = "12px Arial"; baroScale = document.getElementById("div_baroScale"); + baroScale.height = parseInt(document.getElementById("dbaro").offsetHeight, 10); baroScaleCtx = baroScale.getContext("2d"); baroScaleCtx.fillStyle = "#808080"; // color of text baroScaleCtx.font = "12px Arial"; baroMarker = document.getElementById("div_baroMark"); + baroMarker.height = parseInt(document.getElementById("dbaro").offsetHeight, 10); baroMarkCtx = baroMarker.getContext("2d"); baroMarkCtx.fillStyle = "#808080"; // color of text baroMarkCtx.font = "12px Arial"; diff --git a/cunimb.css b/cunimb.css index 866dc05..5bcb5f9 100644 --- a/cunimb.css +++ b/cunimb.css @@ -164,8 +164,8 @@ div.divInfoclass { border-color: black; border-width: 1px; border-style: solid; - height: 605px; -/* height: 90%; */ + /* height: 605px; */ + height: 90%; width: 155px; overflow: hidden; cursor: default; diff --git a/cunimb.js b/cunimb.js index 7af059b..2ba858e 100644 --- a/cunimb.js +++ b/cunimb.js @@ -109,6 +109,7 @@ function chstick() { // change altitude stick function chbaro() { // change barogram if (document.getElementById('baro').checked === true) { // barogram visible document.getElementById('dbaro').style.display = "block"; + document.getElementById('dbaro').style.visibility = "visible"; barogram = 1; hashg = "&g=1"; } else { // no barogram @@ -579,7 +580,7 @@ function alist() { document.getElementById('dlist').style.height = "90%"; if (lside == 1) document.getElementById('ac').style.left = "180px"; else document.getElementById('ac').style.right = "180px"; - document.getElementById('dbaro').style.display = "block"; + if (document.getElementById('baro').checked) document.getElementById('dbaro').style.display = "block"; aflist = true; afftab(); hashn = ""; @@ -1876,6 +1877,7 @@ function initialize() { if (parh.g == "1") { document.getElementById('baro').checked = true; document.getElementById('dbaro').style.display = "block"; + document.getElementById('dbaro').style.visibility = "visible"; barogram = 1; hashg = "&g=1"; } diff --git a/index.php b/index.php index 9fc11c3..33bf93e 100644 --- a/index.php +++ b/index.php @@ -87,7 +87,7 @@ var cxml = "lxml.php"; var cxml1 = "livexml1.php"; var dxml = "dataxml.php"; var rxml = "rec.php"; -var tld = "http://live.glidernet.org"; +var tld = "http://"; var vlon = ; var vlat = ; var vlatmin = ; @@ -117,18 +117,18 @@ catch(e) { - +
-
-
-
+
+
+
-