Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
generateur-slogans
Commits
66777975
Verified
Commit
66777975
authored
Oct 09, 2017
by
Thibaut Broggi
Browse files
Wait for fonts being loaded before image rendering
parent
145ab5a9
Pipeline
#1366
passed with stage
in 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
static/canvas.js
View file @
66777975
...
...
@@ -125,7 +125,7 @@ for (let i = 0; i < navButtons.length; ++i) {
}
}
window
.
on
load
=
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment