diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 9b61d4e26..8571d86b9 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -2208,6 +2208,10 @@ var AppIcon = class AppIcon { this.icon.animateZoomOut(); } + animateLaunchAtPos(x, y) { + this.icon.animateZoomOutAtPos(x, y); + } + scaleIn() { this.actor.scale_x = 0; this.actor.scale_y = 0; diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index ca23bccdb..ffddd11bd 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -142,6 +142,10 @@ class BaseIcon extends St.Bin { zoomOutActor(this.child); } + animateZoomOutAtPos(x, y) { + zoomOutActorAtPos(this.child, x, y); + } + update() { this._createIconTexture(this.iconSize); } @@ -152,10 +156,15 @@ function clamp(value, min, max) { } function zoomOutActor(actor) { + let [x, y] = actor.get_transformed_position(); + zoomOutActorAtPos(actor, x, y); +} + +function zoomOutActorAtPos(actor, x, y) { let actorClone = new Clutter.Clone({ source: actor, reactive: false }); let [width, height] = actor.get_transformed_size(); - let [x, y] = actor.get_transformed_position(); + actorClone.set_size(width, height); actorClone.set_position(x, y); actorClone.opacity = 255;