cleanup
This commit is contained in:
parent
d0382e0de1
commit
5edf5cc947
|
@ -23,7 +23,7 @@ const categories = [
|
|||
'Airport', 'Ferry', 'Marina', 'Pier', 'Port', 'Resort', // POI/Travel
|
||||
'Postal', 'Populated Place',
|
||||
];
|
||||
const cats = categories.join(',');
|
||||
const category = categories.join(',');
|
||||
|
||||
const init = () => {
|
||||
document.getElementById('txtAddress').addEventListener('focus', (e) => {
|
||||
|
@ -54,7 +54,7 @@ const init = () => {
|
|||
params: {
|
||||
f: 'json',
|
||||
countryCode: 'USA', // 'USA,PRI,VIR,GUM,ASM',
|
||||
category: cats,
|
||||
category,
|
||||
maxSuggestions: 10,
|
||||
},
|
||||
dataType: 'json',
|
||||
|
|
|
@ -99,9 +99,11 @@ class HourlyGraph extends WeatherDisplay {
|
|||
});
|
||||
|
||||
// temperature axis labels
|
||||
this.elem.querySelector('.y-axis .l-1').innerHTML = maxTemp;
|
||||
this.elem.querySelector('.y-axis .l-2').innerHTML = midTemp;
|
||||
this.elem.querySelector('.y-axis .l-3').innerHTML = minTemp;
|
||||
// limited to 3 characters, sacraficing degree character
|
||||
const degree = String.fromCharCode(176);
|
||||
this.elem.querySelector('.y-axis .l-1').innerHTML = (maxTemp + degree).substring(0, 3);
|
||||
this.elem.querySelector('.y-axis .l-2').innerHTML = (midTemp + degree).substring(0, 3);
|
||||
this.elem.querySelector('.y-axis .l-3').innerHTML = (minTemp + degree).substring(0, 3);
|
||||
|
||||
// set the image source
|
||||
this.image.src = canvas.toDataURL();
|
||||
|
|
|
@ -23,6 +23,7 @@ let AutoRefreshCountMs = 0;
|
|||
const init = async () => {
|
||||
// set up resize handler
|
||||
window.addEventListener('resize', resize);
|
||||
resize();
|
||||
|
||||
// auto refresh
|
||||
const TwcAutoRefresh = localStorage.getItem('TwcAutoRefresh');
|
||||
|
|
Loading…
Reference in a new issue