Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ℹ️❤️🖥
Explorable-Podcast-Proof-of-Concept
Commits
fbe1bfaf
Commit
fbe1bfaf
authored
Aug 30, 2018
by
i❤computers
Browse files
Handle multiple SVGs for reset
In preparation for bringing in the logo
parent
6cdd6db9
Changes
1
Hide whitespace changes
Inline
Side-by-side
script.js
View file @
fbe1bfaf
...
...
@@ -100,12 +100,15 @@ document.addEventListener('DOMContentLoaded', function initializePage() {
// Doing this cause of a Safari bug: https://bugs.webkit.org/show_bug.cgi?id=183433
function
resetSVGTransforms
()
{
Array
.
from
(
$
(
'
svg
'
)[
0
].
children
).
forEach
(
function
applyTransform
(
element
)
{
element
.
style
.
transform
=
"
scale(1)
"
;
requestAnimationFrame
(
function
removeTransform
()
{
element
.
style
.
transform
=
""
;
$
(
'
svg
'
).
forEach
(
function
resetSVGTransform
(
svg
)
{
Array
.
from
(
svg
.
children
).
forEach
(
function
applyTransform
(
element
)
{
element
.
style
.
transform
=
"
scale(1)
"
;
requestAnimationFrame
(
function
removeTransform
()
{
element
.
style
.
transform
=
""
;
})
})
})
});
}
},
false
);
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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