From e1a55a49c392437cff897c14b2f7e32dfb339531 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Thu, 16 Mar 2023 17:50:54 -0700 Subject: [PATCH] livephoto: restore scale animation Signed-off-by: Varun Patil --- src/components/frame/Photo.vue | 2 +- src/global.scss | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/frame/Photo.vue b/src/components/frame/Photo.vue index e2e33e0c..9040bfc7 100644 --- a/src/components/frame/Photo.vue +++ b/src/components/frame/Photo.vue @@ -405,7 +405,7 @@ div.img-outer { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; - transition: border-radius 0.1s ease-in; + transition: border-radius 0.1s ease-in, transform 0.3s ease-in-out; .p-outer.placeholder > & { display: none; diff --git a/src/global.scss b/src/global.scss index e67da52d..d8fa6c10 100644 --- a/src/global.scss +++ b/src/global.scss @@ -72,13 +72,23 @@ body.has-viewer header { display: block; z-index: 1; } + video { opacity: 0; z-index: 2; transition: opacity 0.3s ease-in-out; } - &.playing.canplay video { - opacity: 1; + img { + transition: transform 0.3s ease-in-out; + } + + &.playing.canplay { + video { + opacity: 1; + } + img { + transform: scale(1.05); + } } }