feat(ags): add height animations when deleting notif
This commit is contained in:
parent
f000da5d65
commit
cd0b8cf39f
1 changed files with 6 additions and 4 deletions
|
@ -56,14 +56,16 @@ export const Draggable = ({
|
||||||
|
|
||||||
if (Math.abs(offset) > maxOffset) {
|
if (Math.abs(offset) > maxOffset) {
|
||||||
if (offset > 0) {
|
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-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 {
|
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-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);
|
setTimeout(command, 500);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue