feat(ags): add height animations when deleting notif

This commit is contained in:
matt1432 2023-09-14 00:57:36 -04:00
parent f000da5d65
commit cd0b8cf39f

View file

@ -56,14 +56,16 @@ export const Draggable = ({
if (Math.abs(offset) > maxOffset) {
if (offset > 0) {
box.setStyle('transition: margin 0.5s ease; ' +
box.setStyle('transition: margin 0.5s ease, opacity 0.5s ease; ' +
'margin-left: ' + Number(maxOffset + endMargin) + 'px; ' +
'margin-right: -' + Number(maxOffset + endMargin) + 'px;');
'margin-right: -' + Number(maxOffset + endMargin) + 'px; ' +
'margin-bottom: -70px; margin-top: -70px; opacity: 0;');
}
else {
box.setStyle('transition: margin 0.5s ease; ' +
box.setStyle('transition: margin 0.5s ease, opacity 0.5s ease; ' +
'margin-left: -' + Number(maxOffset + endMargin) + 'px; ' +
'margin-right: ' + Number(maxOffset + endMargin) + 'px;');
'margin-right: ' + Number(maxOffset + endMargin) + 'px; ' +
'margin-bottom: -70px; margin-top: -70px; opacity: 0;');
}
setTimeout(command, 500);
}