Verified Commit 66777975 authored by Thibaut Broggi's avatar Thibaut Broggi
Browse files

Wait for fonts being loaded before image rendering

parent 145ab5a9
Pipeline #1366 passed with stage
in 35 seconds
......@@ -125,7 +125,7 @@ for (let i = 0; i < navButtons.length; ++i) {
}
}
window.onload = function() {
window.addEventListener('load', function() {
// Display correct tab
let hash = window.location.hash || '#step1';
document.querySelector('nav > a[href="#step3"]').click();
......@@ -161,8 +161,10 @@ window.onload = function() {
document.getElementById('signature').oninput = draw;
// Update canvas
draw();
}
document.fonts.ready.then(function() {
draw();
});
});
let randomElement = function(selector) {
let elems = document.querySelectorAll(selector);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment