fading out banner before removing

This commit is contained in:
Miodec 2022-04-07 14:06:56 +02:00
parent 5169f20ece
commit 41f5edeb31

View file

@ -202,13 +202,18 @@ class Notification {
}
);
} else if (this.type === "banner") {
$(`#bannerCenter .banner[id='${this.id}']`).remove();
const height = $("#bannerCenter").height() as number;
$("#centerContent").css(
"padding-top",
height + Misc.convertRemToPixels(2) + "px"
);
$("#notificationCenter").css("margin-top", height + "px");
$(`#bannerCenter .banner[id='${this.id}']`)
.css("opacity", 1)
.animate(
{
opacity: 0,
},
125,
() => {
$(`#bannerCenter .banner[id='${this.id}']`).remove();
updateMargin();
}
);
}
}
}