kopia lustrzana https://github.com/glidernet/ogn-live
Changes to allow barograph to fit 90% of window size
rodzic
35493904f8
commit
0dec63ced9
|
@ -89,16 +89,19 @@ function baro_Init() {
|
||||||
Y_min = 0;
|
Y_min = 0;
|
||||||
|
|
||||||
baroCanvas = document.getElementById("div_baro");
|
baroCanvas = document.getElementById("div_baro");
|
||||||
|
baroCanvas.height = parseInt(document.getElementById("dbaro").offsetHeight, 10);
|
||||||
baroCtx = baroCanvas.getContext("2d");
|
baroCtx = baroCanvas.getContext("2d");
|
||||||
baroCtx.fillStyle = "#808080"; // color of text
|
baroCtx.fillStyle = "#808080"; // color of text
|
||||||
baroCtx.font = "12px Arial";
|
baroCtx.font = "12px Arial";
|
||||||
|
|
||||||
baroScale = document.getElementById("div_baroScale");
|
baroScale = document.getElementById("div_baroScale");
|
||||||
|
baroScale.height = parseInt(document.getElementById("dbaro").offsetHeight, 10);
|
||||||
baroScaleCtx = baroScale.getContext("2d");
|
baroScaleCtx = baroScale.getContext("2d");
|
||||||
baroScaleCtx.fillStyle = "#808080"; // color of text
|
baroScaleCtx.fillStyle = "#808080"; // color of text
|
||||||
baroScaleCtx.font = "12px Arial";
|
baroScaleCtx.font = "12px Arial";
|
||||||
|
|
||||||
baroMarker = document.getElementById("div_baroMark");
|
baroMarker = document.getElementById("div_baroMark");
|
||||||
|
baroMarker.height = parseInt(document.getElementById("dbaro").offsetHeight, 10);
|
||||||
baroMarkCtx = baroMarker.getContext("2d");
|
baroMarkCtx = baroMarker.getContext("2d");
|
||||||
baroMarkCtx.fillStyle = "#808080"; // color of text
|
baroMarkCtx.fillStyle = "#808080"; // color of text
|
||||||
baroMarkCtx.font = "12px Arial";
|
baroMarkCtx.font = "12px Arial";
|
||||||
|
|
|
@ -164,8 +164,8 @@ div.divInfoclass {
|
||||||
border-color: black;
|
border-color: black;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
height: 605px;
|
/* height: 605px; */
|
||||||
/* height: 90%; */
|
height: 90%;
|
||||||
width: 155px;
|
width: 155px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
|
|
@ -109,6 +109,7 @@ function chstick() { // change altitude stick
|
||||||
function chbaro() { // change barogram
|
function chbaro() { // change barogram
|
||||||
if (document.getElementById('baro').checked === true) { // barogram visible
|
if (document.getElementById('baro').checked === true) { // barogram visible
|
||||||
document.getElementById('dbaro').style.display = "block";
|
document.getElementById('dbaro').style.display = "block";
|
||||||
|
document.getElementById('dbaro').style.visibility = "visible";
|
||||||
barogram = 1;
|
barogram = 1;
|
||||||
hashg = "&g=1";
|
hashg = "&g=1";
|
||||||
} else { // no barogram
|
} else { // no barogram
|
||||||
|
@ -579,7 +580,7 @@ function alist() {
|
||||||
document.getElementById('dlist').style.height = "90%";
|
document.getElementById('dlist').style.height = "90%";
|
||||||
if (lside == 1) document.getElementById('ac').style.left = "180px";
|
if (lside == 1) document.getElementById('ac').style.left = "180px";
|
||||||
else document.getElementById('ac').style.right = "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;
|
aflist = true;
|
||||||
afftab();
|
afftab();
|
||||||
hashn = "";
|
hashn = "";
|
||||||
|
@ -1876,6 +1877,7 @@ function initialize() {
|
||||||
if (parh.g == "1") {
|
if (parh.g == "1") {
|
||||||
document.getElementById('baro').checked = true;
|
document.getElementById('baro').checked = true;
|
||||||
document.getElementById('dbaro').style.display = "block";
|
document.getElementById('dbaro').style.display = "block";
|
||||||
|
document.getElementById('dbaro').style.visibility = "visible";
|
||||||
barogram = 1;
|
barogram = 1;
|
||||||
hashg = "&g=1";
|
hashg = "&g=1";
|
||||||
}
|
}
|
||||||
|
|
18
index.php
18
index.php
|
@ -87,7 +87,7 @@ var cxml = "lxml.php";
|
||||||
var cxml1 = "livexml1.php";
|
var cxml1 = "livexml1.php";
|
||||||
var dxml = "dataxml.php";
|
var dxml = "dataxml.php";
|
||||||
var rxml = "rec.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 vlon = <?php echo $lon; ?>;
|
||||||
var vlat = <?php echo $lat; ?>;
|
var vlat = <?php echo $lat; ?>;
|
||||||
var vlatmin = <?php echo $latmin;?>;
|
var vlatmin = <?php echo $latmin;?>;
|
||||||
|
@ -117,18 +117,18 @@ catch(e) {
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body onload="initialize()">
|
<body onload="initialize()">
|
||||||
<div id="popup" onclick="cp('popup');"></div>
|
<div id="popup" onclick="cp('popup');"></div>
|
||||||
<div id="map_canvas"></div>
|
<div id="map_canvas"></div>
|
||||||
<div id="ac" class="acright" onclick="this.style.display='none';"></div>
|
<div id="ac" class="acright" onclick="this.style.display='none';"></div>
|
||||||
<div id="dlist" class="lright">
|
<div id="dlist" class="lright">
|
||||||
<DIV id="ett1" ></DIV>
|
<DIV id="ett1" ></DIV>
|
||||||
<DIV id="ett2" ></DIV>
|
<DIV id="ett2" ></DIV>
|
||||||
<DIV id="dtable"></DIV>
|
<DIV id="dtable"></DIV>
|
||||||
</div>
|
</div>
|
||||||
<div id="dbaro" class="baroleft" style="display:none">
|
<div id="dbaro" class="baroleft" style="display:block; visibility:hidden;">
|
||||||
<canvas id="div_baroScale" height="600" width="45"></canvas>
|
<canvas id="div_baroScale" width="45" ></canvas>
|
||||||
<canvas id="div_baro" height="600" width="70"></canvas>
|
<canvas id="div_baro" width="70"></canvas>
|
||||||
<canvas id="div_baroMark" height="600" width="30"></canvas>
|
<canvas id="div_baroMark" width="30" ></canvas>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue