Skip to content
Snippets Groups Projects
Commit eeb40ec4 authored by Tilman Vatteroth's avatar Tilman Vatteroth :robot:
Browse files

workaround because firefox is a bitch

parent ace87360
No related branches found
No related tags found
No related merge requests found
...@@ -56,15 +56,15 @@ this.loaded = function(panel, config) { ...@@ -56,15 +56,15 @@ this.loaded = function(panel, config) {
bigFontPost = "time-medium", // width * 43.75% bigFontPost = "time-medium", // width * 43.75%
smlFontPost = "time-medium"; // width * 18.75% smlFontPost = "time-medium"; // width * 18.75%
init = function() { inita = function() {
if (fontsReady) { if (window.fontsReady) {
digiBackground = document.createElement('canvas'); digiBackground = document.createElement('canvas');
analBackground = document.createElement('canvas'); analBackground = document.createElement('canvas');
me.resize($(panel).width(), $(panel).height()); me.resize($(panel).width(), $(panel).height());
loop(); loop();
} else { } else {
setTimeout(init,0); setTimeout(inita,0);
} }
} }
...@@ -74,8 +74,6 @@ this.loaded = function(panel, config) { ...@@ -74,8 +74,6 @@ this.loaded = function(panel, config) {
} }
this.resize = function(width, height) { this.resize = function(width, height) {
console.log("width " + width);
console.log("height " + height);
if (height > width) { if (height > width) {
var size = height / 2; var size = height / 2;
if (!!analClock) { if (!!analClock) {
...@@ -306,9 +304,8 @@ console.log("height " + height); ...@@ -306,9 +304,8 @@ console.log("height " + height);
abgc.drawImage(bc, -analogRad, -analogRad, analogRad * 2, analogRad * 2); abgc.drawImage(bc, -analogRad, -analogRad, analogRad * 2, analogRad * 2);
} }
analBGImg.onload = function() { analBGImg.onload = function() {
init(); inita();
} }
analBGImg.src = analBGFile; analBGImg.src = analBGFile;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment