Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 计算全屏 typewriterMode 位置 #294

Merged
merged 2 commits into from Apr 10, 2020

Conversation

stevapple
Copy link
Contributor

@stevapple stevapple commented Apr 9, 2020

在所有场景下动态地固定 typewriterMode 中心。

@stevapple stevapple changed the base branch from master to dev April 9, 2020 07:18
@stevapple stevapple force-pushed the fullscreen branch 2 times, most recently from ef360a4 to 99795a6 Compare April 9, 2020 07:30
@Vanessa219
Copy link
Owner

高度为 auto 开启 typewriterMode 的相关代码在 scrollCenter

@stevapple
Copy link
Contributor Author

行为是自动在底部保持位置么?

如果没有用到 :after(看上去没有),那我的修改应该无影响,仅仅是去掉了一个无用的变量。

@stevapple
Copy link
Contributor Author

stevapple commented Apr 9, 2020

auto 高度下的 :after 作用仅仅是决定垫高的高度么?如果是这样是不是应该设置为定高?

@stevapple
Copy link
Contributor Author

继续更新:看懂了 auto 高度的工作原理了,那么全屏模式是什么情况?看上去打字机行为和一般模式不一致。

只有 Safari 下呈现了「类打字机效果」,Chromium 和 FireFox 只能在底部固定位置。

@stevapple stevapple force-pushed the fullscreen branch 2 times, most recently from 9c23765 to 1ac5b2d Compare April 9, 2020 09:02
@stevapple
Copy link
Contributor Author

关于修改打字机模式工作原理的代码已经全部回滚,目前的 commit 只包括动态调整的监听部分。

@stevapple
Copy link
Contributor Author

有关全屏模式的问题应该是个棘手的 bug,后续在 #295 中继续交流吧

@Vanessa219 Vanessa219 merged commit a0e6d91 into Vanessa219:dev Apr 10, 2020
@stevapple stevapple deleted the fullscreen branch April 10, 2020 02:52
@Vanessa219 Vanessa219 changed the title 🐛 typewriterMode 中心位置 🐛计算全屏 typewriterMode 位置 Apr 10, 2020
@Vanessa219 Vanessa219 self-requested a review April 10, 2020 05:45
@Vanessa219 Vanessa219 added this to the 3.1.0 milestone Apr 10, 2020
@Vanessa219 Vanessa219 changed the title 🐛计算全屏 typewriterMode 位置 🐛 计算全屏 typewriterMode 位置 Apr 10, 2020
Vanessa219 added a commit that referenced this pull request Apr 10, 2020
@stevapple
Copy link
Contributor Author

stevapple commented Apr 10, 2020

@Vanessa219 调整过之后的代码在开启/关闭全屏模式时没有重新计算 typewriterMode 位置(不会触发 resize 事件,但是 typewriterMode 位置会发生变化),需要在 Fullscreen.ts 里补上。

@Vanessa219
Copy link
Owner

fullscreen.ts 中调用了 setTypewriterPosition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants