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

Update sakura-app.js #96

Merged
merged 1 commit into from
Aug 2, 2019
Merged

Update sakura-app.js #96

merged 1 commit into from
Aug 2, 2019

Conversation

Laxse
Copy link
Contributor

@Laxse Laxse commented Jul 28, 2019

监听浏览器resize 需要加settimeout

监听浏览器resize 需要加settimeout
@mashirozx
Copy link
Owner

抱歉这块我不是太懂,设置settimeout为何能够提高性能?

@Laxse
Copy link
Contributor Author

Laxse commented Aug 2, 2019

因为js的resize在改变浏览器的窗口大小时候会执行多次,有些浏览器会渲染不过来,所以常规开发中都会加上0.5-1s的延时

@mashirozx mashirozx merged commit 8bde25a into mashirozx:master Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants