Changes to allow barograph to fit 90% of window size

pull/47/merge
cunimb 2017-09-11 19:02:44 +02:00 zatwierdzone przez GitHub
rodzic 35493904f8
commit 0dec63ced9
4 zmienionych plików z 17 dodań i 12 usunięć

Wyświetl plik

@ -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";

Wyświetl plik

@ -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;

Wyświetl plik

@ -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";
}

Wyświetl plik

@ -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://<?php echo $_SERVER['HTTP_HOST'];?>";
var vlon = <?php echo $lon; ?>;
var vlat = <?php echo $lat; ?>;
var vlatmin = <?php echo $latmin;?>;
@ -117,18 +117,18 @@ catch(e) {
</head>
<body onload="initialize()">
<div id="popup" onclick="cp('popup');"></div>
<div id="popup" onclick="cp('popup');"></div>
<div id="map_canvas"></div>
<div id="ac" class="acright" onclick="this.style.display='none';"></div>
<div id="dlist" class="lright">
<DIV id="ett1" ></DIV>
<DIV id="ett2" ></DIV>
<DIV id="dtable"></DIV>
<DIV id="ett1" ></DIV>
<DIV id="ett2" ></DIV>
<DIV id="dtable"></DIV>
</div>
<div id="dbaro" class="baroleft" style="display:none">
<canvas id="div_baroScale" height="600" width="45"></canvas>
<canvas id="div_baro" height="600" width="70"></canvas>
<canvas id="div_baroMark" height="600" width="30"></canvas>
<div id="dbaro" class="baroleft" style="display:block; visibility:hidden;">
<canvas id="div_baroScale" width="45" ></canvas>
<canvas id="div_baro" width="70"></canvas>
<canvas id="div_baroMark" width="30" ></canvas>
</div>
</body>