functional checkboxes
This commit is contained in:
parent
4eeae7b9ef
commit
e45e3d5a62
4 changed files with 32 additions and 12 deletions
|
|
@ -79,10 +79,16 @@ class TravelForecast extends WeatherDisplay {
|
|||
this.longCanvas.width = 640;
|
||||
this.longCanvas.height = 1728;
|
||||
this.longContext = this.longCanvas.getContext('2d');
|
||||
this.longCanvasGifs = [];
|
||||
}
|
||||
// set up variables
|
||||
const cities = this.data;
|
||||
|
||||
// clean up existing gifs
|
||||
this.gifs.forEach(gif => gif.pause());
|
||||
// delete the gifs
|
||||
this.gifs.length = 0;
|
||||
|
||||
this.longContext.clearRect(0,0,this.longCanvas.width,this.longCanvas.height);
|
||||
|
||||
// draw the "long" canvas with all cities
|
||||
|
|
@ -120,7 +126,7 @@ class TravelForecast extends WeatherDisplay {
|
|||
const xHigh = (560 - (highString.length * 20));
|
||||
draw.text(this.longContext, 'Star4000 Large', '24pt', '#FFFF00', xHigh, y, highString, 2);
|
||||
|
||||
this.gifs.push(await utils.image.superGifAsync({
|
||||
this.longCanvasGifs.push(await utils.image.superGifAsync({
|
||||
src: city.icon,
|
||||
loop_delay: 100,
|
||||
auto_play: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue