From 6e24596a422664e25b6484a33c5886ca8a2edec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Wed, 18 Oct 2017 19:09:23 +0200 Subject: [PATCH] Use staggered scaling when folding the minimaps --- minimap.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/minimap.js b/minimap.js index 7434289..2f130b0 100644 --- a/minimap.js +++ b/minimap.js @@ -137,10 +137,11 @@ Minimap = new Lang.Class({ let clone = clones[i]; clone.set_pivot_point(0, 0.5); if (clone.x + this.minimapActor.x <= -maxProtrusion) { + let scale = 1 - 0.05*(around - i); Tweener.addTween(clone, {x: -this.minimapActor.x - (maxProtrusion - i*leftStackGap) - , scale_x: 0.9 - , scale_y: 0.9 + , scale_x: scale + , scale_y: scale , transition: "easeInOutQuad" , time: time}); } else { @@ -153,11 +154,12 @@ Minimap = new Lang.Class({ let clone = clones[i]; clone.set_pivot_point(1, 0.5); if (clone.x + clone.width + this.minimapActor.x >= primary.width + maxProtrusion) { + let scale = 1 - 0.05*(i - around); Tweener.addTween(clone, {x: -this.minimapActor.x + primary.width + (maxProtrusion - (clones.length-1 - i)*rightStackGap) - clone.width - , scale_x: 0.9 - , scale_y: 0.9 + , scale_x: scale + , scale_y: scale , transition: "easeInOutQuad" , time: time}); }