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() {
|
||||
play("click");
|
||||
document.getElementById('dialog-content').style.opacity = '0';
|
||||
|
||||
document.getElementById('dialog-content').style.display = 'none';
|
||||
let root = document.documentElement;
|
||||
let dialogElement = document.getElementById('dialog');
|
||||
let detailsElement = document.getElementById('details');
|
||||
|
||||
dialogElement.animate([
|
||||
{
|
||||
opacity: 0,
|
||||
width: getStyleProperty(root, '--keyframe-hide-dialog-width'),
|
||||
height: getStyleProperty(root, '--keyframe-hide-dialog-height'),
|
||||
paddingBottom: getStyleProperty(root, '--keyframe-hide-dialog-padding-bottom'),
|
||||
}
|
||||
], {
|
||||
fill: 'forwards',
|
||||
easing: 'ease-out',
|
||||
duration: 250
|
||||
});
|
||||
dialogElement.style.display = 'none';
|
||||
|
||||
let detailsElement = document.getElementById('details');
|
||||
detailsElement.style.display = 'inline-block';
|
||||
setTimeout(function(){
|
||||
dialogElement.style.display = 'none';
|
||||
detailsElement.style.display = 'inline-block';
|
||||
}, 250);
|
||||
|
||||
detailsElement.animate([
|
||||
{
|
||||
opacity: 0, offset: 0.95
|
||||
|
|
Loading…
Reference in a new issue