iconGrid: Only add one onComplete callback for the animations
We only need a callback on the last animated actor, so no need to register the callback for all actors. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/678
This commit is contained in:
parent
b499ca47a3
commit
6f4c5022eb
@ -545,12 +545,12 @@ var IconGrid = GObject.registerClass({
|
|||||||
scale_y: 1,
|
scale_y: 1,
|
||||||
duration: ANIMATION_TIME_IN,
|
duration: ANIMATION_TIME_IN,
|
||||||
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
|
||||||
delay,
|
delay
|
||||||
onComplete: () => {
|
|
||||||
if (isLastItem)
|
|
||||||
this._animationDone();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (isLastItem)
|
||||||
|
movementParams.onComplete = this._animationDone.bind(this);
|
||||||
|
|
||||||
fadeParams = {
|
fadeParams = {
|
||||||
opacity: 255,
|
opacity: 255,
|
||||||
duration: ANIMATION_FADE_IN_TIME_FOR_ITEM,
|
duration: ANIMATION_FADE_IN_TIME_FOR_ITEM,
|
||||||
@ -571,13 +571,12 @@ var IconGrid = GObject.registerClass({
|
|||||||
scale_y: scaleY,
|
scale_y: scaleY,
|
||||||
duration: ANIMATION_TIME_OUT,
|
duration: ANIMATION_TIME_OUT,
|
||||||
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
|
||||||
delay,
|
delay
|
||||||
onComplete: () => {
|
|
||||||
if (isLastItem) {
|
|
||||||
this._animationDone();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (isLastItem)
|
||||||
|
movementParams.onComplete = this._animationDone.bind(this);
|
||||||
|
|
||||||
fadeParams = {
|
fadeParams = {
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
duration: ANIMATION_FADE_IN_TIME_FOR_ITEM,
|
duration: ANIMATION_FADE_IN_TIME_FOR_ITEM,
|
||||||
|
Loading…
Reference in New Issue
Block a user