diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index 60f2653f0..538970034 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -418,6 +418,11 @@ var IconGrid = new Lang.Class({ }, _animationDone() { + this._clonesAnimating.forEach(clone => { + clone.source.reactive = true; + clone.source.opacity = 255; + clone.destroy(); + }); this._clonesAnimating = []; this.emit('animation-done'); }, @@ -538,10 +543,6 @@ var IconGrid = new Lang.Class({ onComplete: () => { if (isLastItem) this._animationDone(); - - actor.opacity = 255; - actor.reactive = true; - actorClone.destroy(); }}; fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM, transition: 'easeInOutQuad', @@ -562,12 +563,8 @@ var IconGrid = new Lang.Class({ scale_x: scaleX, scale_y: scaleY, onComplete: () => { - if (isLastItem) { + if (isLastItem) this._animationDone(); - this._restoreItemsOpacity(); - } - actor.reactive = true; - actorClone.destroy(); }}; fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM, transition: 'easeInOutQuad', @@ -581,12 +578,6 @@ var IconGrid = new Lang.Class({ } }, - _restoreItemsOpacity() { - for (let index = 0; index < this._items.length; index++) { - this._items[index].actor.opacity = 255; - } - }, - _getAllocatedChildSizeAndSpacing(child) { let [,, natWidth, natHeight] = child.get_preferred_size(); let width = Math.min(this._getHItemSize(), natWidth);