解决HiDPI/Retina显示器进入tpi时,提示缩放比例变动的问题。

dev_ec
hjm 6 years ago
parent 9e68757d50
commit 4a95592b67

@ -1113,13 +1113,16 @@ function _initZoomCheck() {
if (!IsPC()) { // 手机端不需要提示
return;
}
var isNormalZoom = Math.round(window.devicePixelRatio * 100) === 100
var ratio = Math.round(window.devicePixelRatio * 100);
// A value of 1 indicates a classic 96 DPI (76 DPI on some platforms) display, while a value of 2 is expected for HiDPI/Retina displays
var isNormalZoom = ratio === 100 || ratio === 200
if (!isNormalZoom) {
suofang();
}
$(window).resize(function() {
var isNormalZoom = Math.round(window.devicePixelRatio * 100) === 100
var ratio = Math.round(window.devicePixelRatio * 100);
var isNormalZoom = ratio === 100 || ratio === 200
if (!isNormalZoom) {
suofang();
} else {

Loading…
Cancel
Save