Skip to content

Commit 366f2f8

Browse files
committed
Optimize the duration of height animation
1 parent bcdbee8 commit 366f2f8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

_posts/opera/2022-08-21-昆曲「西厢记·跳墙着棋」折子.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ tags: 看剧 摄影 戏剧 杭州 昆曲 浙昆 西厢记 跳墙着棋 张唐逍
160160

161161
![](https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/opera/20220821/xixiangji_tiaoqiangzhuoqi/DSC02486_thumb.jpg){: loading="lazy" class="clickable clickShowOriginalImg operaCopyright" alt="西厢记 跳墙着棋 张唐逍 吴心怡 席秉琪" }
162162

163-
*张生:看,少了颗棋子,是谁偷的我不说 👀*
163+
*张生:看,少了颗棋子,是谁偷的我不说👀*
164164

165165
![](https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/opera/20220821/xixiangji_tiaoqiangzhuoqi/DSC02488_thumb.jpg){: loading="lazy" class="clickable clickShowOriginalImg operaCopyright" alt="西厢记 跳墙着棋 张唐逍 席秉琪 吴心怡" }
166166

npm/dist/blog-scaffold-v2.0.0.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/src/component/animation/HeightAnimationContainer.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ export class HeightAnimationContainer {
107107
duration = _duration
108108
consoleDebug("HeightAnimationContainer use given duration + " + duration + "s")
109109
} else {
110-
duration = animationSize / 600
110+
duration = animationSize / 1800
111111
consoleDebug("HeightAnimationContainer child total height = " + height + ", lastHeight = " + lastHeight +
112112
", animationSize = " + animationSize + ", duration = " + duration + "s")
113-
if (duration < 0.1) {
114-
duration = 0.1
113+
if (duration < 0.3) {
114+
duration = 0.3
115115
consoleDebug("Actual duration = " + duration + "s")
116116
}
117-
if (duration > 0.3) {
118-
duration = 0.3
117+
if (duration > 0.5) {
118+
duration = 0.5
119119
consoleDebug("Actual duration = " + duration + "s")
120120
}
121121
}

0 commit comments

Comments
 (0)