From 6172a5f8923ae2462f857163c530aba456d577ff Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 20 Aug 2023 17:41:52 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/9004 --- app/src/assets/scss/protyle/_wysiwyg.scss | 4 ++++ app/src/assets/scss/util/_keyframes.scss | 12 ++++++++++++ app/src/menus/protyle.ts | 5 +++++ 3 files changed, 21 insertions(+) diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss index d23ee1f16..bf4fba002 100644 --- a/app/src/assets/scss/protyle/_wysiwyg.scss +++ b/app/src/assets/scss/protyle/_wysiwyg.scss @@ -466,6 +466,10 @@ } } + &--animate { + animation: scale 0.3s ease-in-out; + } + [data-type="backslash"] span { display: none; } diff --git a/app/src/assets/scss/util/_keyframes.scss b/app/src/assets/scss/util/_keyframes.scss index a082e97b9..c41c8906d 100644 --- a/app/src/assets/scss/util/_keyframes.scss +++ b/app/src/assets/scss/util/_keyframes.scss @@ -40,6 +40,18 @@ } } +@keyframes scale { + 0% { + transform: scaleY(1.3); + transform-origin: 0 0; + opacity: 0; + } + + 100% { + transform: scaleY(1); + } +} + @keyframes stripMove { 0% { background-position: 0 0; diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 2a5395a31..8f7ab09c5 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -626,6 +626,11 @@ export const zoomOut = (options: { }); return; } + } else { + options.protyle.wysiwyg.element.classList.add("protyle-wysiwyg--animate"); + setTimeout(() => { + options.protyle.wysiwyg.element.classList.remove("protyle-wysiwyg--animate"); + }, 365); } /// #if !MOBILE if (options.protyle.model) {