mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-21 11:09:30 -07:00
functional checkboxes
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user