Fix "instant" screen switching animation
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
a5faada17c
commit
17d09485dd
1 changed files with 9 additions and 5 deletions
|
@ -18,25 +18,29 @@ function close_button(href) {
|
||||||
|
|
||||||
function details_button() {
|
function details_button() {
|
||||||
play("click");
|
play("click");
|
||||||
|
document.getElementById('dialog-content').style.opacity = '0';
|
||||||
|
|
||||||
document.getElementById('dialog-content').style.display = 'none';
|
|
||||||
let root = document.documentElement;
|
let root = document.documentElement;
|
||||||
let dialogElement = document.getElementById('dialog');
|
let dialogElement = document.getElementById('dialog');
|
||||||
|
let detailsElement = document.getElementById('details');
|
||||||
|
|
||||||
dialogElement.animate([
|
dialogElement.animate([
|
||||||
{
|
{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
width: getStyleProperty(root, '--keyframe-hide-dialog-width'),
|
width: getStyleProperty(root, '--keyframe-hide-dialog-width'),
|
||||||
height: getStyleProperty(root, '--keyframe-hide-dialog-height'),
|
paddingBottom: getStyleProperty(root, '--keyframe-hide-dialog-padding-bottom'),
|
||||||
}
|
}
|
||||||
], {
|
], {
|
||||||
fill: 'forwards',
|
fill: 'forwards',
|
||||||
easing: 'ease-out',
|
easing: 'ease-out',
|
||||||
duration: 250
|
duration: 250
|
||||||
});
|
});
|
||||||
dialogElement.style.display = 'none';
|
|
||||||
|
|
||||||
let detailsElement = document.getElementById('details');
|
setTimeout(function(){
|
||||||
|
dialogElement.style.display = 'none';
|
||||||
detailsElement.style.display = 'inline-block';
|
detailsElement.style.display = 'inline-block';
|
||||||
|
}, 250);
|
||||||
|
|
||||||
detailsElement.animate([
|
detailsElement.animate([
|
||||||
{
|
{
|
||||||
opacity: 0, offset: 0.95
|
opacity: 0, offset: 0.95
|
||||||
|
|
Loading…
Add table
Reference in a new issue