From 5b4aa69d4d7c52a63e3dadfe06a5089965341119 Mon Sep 17 00:00:00 2001 From: epiqueras Date: Fri, 12 Jul 2019 16:09:41 -0500 Subject: [PATCH] Block Editor: Add a small fly-in animation when blocks first render or zoom is changed. --- .../src/components/block-list/moving-animation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/block-list/moving-animation.js b/packages/block-editor/src/components/block-list/moving-animation.js index 393bfa33e2a7ca..f020d9789e5bab 100644 --- a/packages/block-editor/src/components/block-list/moving-animation.js +++ b/packages/block-editor/src/components/block-list/moving-animation.js @@ -40,8 +40,8 @@ function useMovingAnimation( ref, isSelected, enableAnimation, triggerAnimationO ref.current.style.transform = 'none'; const destination = ref.current.getBoundingClientRect(); const newTransform = { - x: previous ? previous.left - destination.left : 0, - y: previous ? previous.top - destination.top : 0, + x: previous ? previous.left - destination.left : -50, + y: previous ? previous.top - destination.top : -50, }; ref.current.style.transform = newTransform.x === 0 && newTransform.y === 0 ? undefined :