tasks:return bounce on start when destructed

work/usta_fix_ecm_version_check
Michail Vourlakos 3 years ago
parent bd6ae904b9
commit 6bce84c68b

@ -10,6 +10,15 @@ import org.kde.plasma.plasmoid 2.0
SequentialAnimation{ SequentialAnimation{
readonly property string bouncePropertyName: taskItem.isVertical ? "iconAnimatedOffsetX" : "iconAnimatedOffsetY" readonly property string bouncePropertyName: taskItem.isVertical ? "iconAnimatedOffsetX" : "iconAnimatedOffsetY"
Component.onDestruction: {
//! make sure to return on initial position even when the animation is destroyed in the middle
if (taskItem.isVertical) {
taskItem.iconAnimatedOffsetX = 0;
} else {
taskItem.iconAnimatedOffsetY = 0;
}
}
//Ghost animation that acts as a delayer //Ghost animation that acts as a delayer
PropertyAnimation { PropertyAnimation {
target: taskItem.parabolicItem target: taskItem.parabolicItem
@ -45,4 +54,13 @@ SequentialAnimation{
duration: 4*launcherAnimation.speed duration: 4*launcherAnimation.speed
easing.type: Easing.OutBounce easing.type: Easing.OutBounce
} }
onStopped: {
//! make sure to return on initial position even when the animation is destroyed in the middle
if (taskItem.isVertical) {
taskItem.iconAnimatedOffsetX = 0;
} else {
taskItem.iconAnimatedOffsetY = 0;
}
}
} }

@ -21,6 +21,15 @@ SequentialAnimation{
} }
} }
Component.onDestruction: {
//! make sure to return on initial position even when the animation is destroyed in the middle
if (taskItem.isVertical) {
taskItem.iconAnimatedOffsetX = 0;
} else {
taskItem.iconAnimatedOffsetY = 0;
}
}
ParallelAnimation { ParallelAnimation {
PropertyAnimation { PropertyAnimation {
target: taskItem target: taskItem
@ -38,4 +47,13 @@ SequentialAnimation{
duration: 4.4*newWindowAnimation.speed duration: 4.4*newWindowAnimation.speed
easing.type: Easing.OutBounce easing.type: Easing.OutBounce
} }
onStopped: {
//! make sure to return on initial position even when the animation is destroyed in the middle
if (taskItem.isVertical) {
taskItem.iconAnimatedOffsetX = 0;
} else {
taskItem.iconAnimatedOffsetY = 0;
}
}
} }

Loading…
Cancel
Save