chore: CSS zoom scale comment cleanup
This commit is contained in:
@@ -280,11 +280,8 @@ class MainActivity : Activity() {
|
||||
webView.webViewClient = object : WebViewClient() {
|
||||
override fun onPageFinished(view: WebView?, url: String?) {
|
||||
Log.d(TAG, "content onPageFinished: url=$url scale=$scale")
|
||||
// 缩放:网易云 PC 版不响应 viewport meta 的 initial-scale,
|
||||
// 改用 CSS zoom(会 reflow,内容填满不留白),对任何页面可靠生效
|
||||
// Zoom: desktop pages (e.g. NetEase Music) ignore viewport-meta
|
||||
// initial-scale, so use CSS zoom (reflows, no blank space), which
|
||||
// works reliably on any page
|
||||
// 缩放:CSS zoom(会 reflow,内容填满不留白),对任何页面可靠生效
|
||||
// Zoom: CSS zoom (reflows, no blank space), reliable on any page
|
||||
if (scale != null && scale in 1..100) {
|
||||
val zoom = scale / 100f
|
||||
view?.evaluateJavascript(
|
||||
|
||||
@@ -44,9 +44,9 @@ class WebViewManager(private val activity: Activity) {
|
||||
else -> ua
|
||||
}
|
||||
// scale 由 WebAppHost 在 onPageFinished 里通过 CSS zoom 实现(reflow 缩放),
|
||||
// 此处不再做 View 级别缩放
|
||||
// 此处不做缩放
|
||||
// scale is applied by WebAppHost via CSS zoom in onPageFinished (reflow
|
||||
// scaling); no view-level scaling here
|
||||
// scaling); no scaling here
|
||||
return webView
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user