diff --git a/ReadMe.txt b/ReadMe.txt index 89166cf..adf3314 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -2,8 +2,8 @@ SteelSeries JavaScript gauges ============================= Created by Mark Crossley July 2011 -Version 2.7.5 -Updated: 30 September 2019 +Version 2.7.6 +Updated: 17 February 2021 +-------------------------------------------------------+ | | diff --git a/web_server/css/gauges-ss.css b/web_server/css/gauges-ss.css index ffb2070..00836e1 100644 --- a/web_server/css/gauges-ss.css +++ b/web_server/css/gauges-ss.css @@ -24,6 +24,13 @@ body { display: inline-block; position: relative; } +.odo { + position: absolute; + top: 67%; + left: 50%; + transform: translateX(-50%); + -webkit-transform: translateX(-50%); +} .gaugeSizeSml { width: 181px; height: 181px; diff --git a/web_server/scripts/gauges.js b/web_server/scripts/gauges.js index 5ff105e..3c6d74d 100644 --- a/web_server/scripts/gauges.js +++ b/web_server/scripts/gauges.js @@ -33,7 +33,7 @@ gauges = (function () { var strings = LANG.EN, // Set to your default language. Store all the strings in one object config = { // Script configuration parameters you may want to 'tweak' - scriptVer : '2.7.5', + scriptVer : '2.7.6', weatherProgram : 0, // Set 0=Cumulus, 1=Weather Display, 2=VWS, 3=WeatherCat, 4=Meteobridge, 5=WView, 6=WeeWX, 7=WLCOM imgPathURL : './images/', // *** Change this to the relative path for your 'Trend' graph images oldGauges : 'gauges.htm', // *** Change this to the relative path for your 'old' gauges page. @@ -2166,11 +2166,7 @@ gauges = (function () { height: cache.odoHeight }); // Position it - $(buffers.Odo).css({ - position: 'absolute', - top : Math.ceil(cache.gaugeSize * 0.7 + $('#canvas_rose').position().top) + 'px', - left : Math.ceil((cache.gaugeSize - cache.odoWidth) / 2 + $('#canvas_rose').position().left) + 'px' - }); + $(buffers.Odo).attr("class", "odo"); // Insert it into the DOM before the Rose gauge $(buffers.Odo).insertBefore('#canvas_rose'); // Create the odometer