gis-common 1.1.14 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/resource.min.js +7 -5
- package/package.json +1 -1
package/dist/resource.min.js
CHANGED
|
@@ -2400,10 +2400,12 @@ function DevicePixelRatio_classCallCheck(instance, Constructor) { if (!(instance
|
|
|
2400
2400
|
|
|
2401
2401
|
var DevicePixelRatio = function () {
|
|
2402
2402
|
function DevicePixelRatio() {
|
|
2403
|
+
var magnification = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
2404
|
+
|
|
2403
2405
|
DevicePixelRatio_classCallCheck(this, DevicePixelRatio);
|
|
2404
|
-
}
|
|
2405
|
-
// this.flag = false;
|
|
2406
2406
|
|
|
2407
|
+
this.magnification = magnification;
|
|
2408
|
+
}
|
|
2407
2409
|
// 获取系统类型
|
|
2408
2410
|
|
|
2409
2411
|
|
|
@@ -2460,19 +2462,19 @@ var DevicePixelRatio = function () {
|
|
|
2460
2462
|
// 当前页面宽度相对于 750 宽的缩放比例,可根据自己需要修改。
|
|
2461
2463
|
var scale = document.documentElement.clientWidth / pageWidth;
|
|
2462
2464
|
// 设置页面根节点字体大小
|
|
2463
|
-
document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px';
|
|
2465
|
+
document.documentElement.style.fontSize = this.magnification * baseSize * Math.min(scale, 2) + 'px';
|
|
2464
2466
|
} else if (pageWidth > 750 && pageWidth <= 1200) {
|
|
2465
2467
|
var _baseSize = 85;
|
|
2466
2468
|
// 当前页面宽度相对于 750 宽的缩放比例,可根据自己需要修改。
|
|
2467
2469
|
var _scale = document.documentElement.clientWidth / pageWidth;
|
|
2468
2470
|
// 设置页面根节点字体大小
|
|
2469
|
-
document.documentElement.style.fontSize = _baseSize * Math.min(_scale, 2) + 'px';
|
|
2471
|
+
document.documentElement.style.fontSize = this.magnification * _baseSize * Math.min(_scale, 2) + 'px';
|
|
2470
2472
|
} else {
|
|
2471
2473
|
var _baseSize2 = 100;
|
|
2472
2474
|
// 当前页面宽度相对于 750 宽的缩放比例,可根据自己需要修改。
|
|
2473
2475
|
var _scale2 = document.documentElement.clientWidth / 1920;
|
|
2474
2476
|
// 设置页面根节点字体大小
|
|
2475
|
-
document.documentElement.style.fontSize = _baseSize2 * Math.min(_scale2, 2) + 'px';
|
|
2477
|
+
document.documentElement.style.fontSize = this.magnification * _baseSize2 * Math.min(_scale2, 2) + 'px';
|
|
2476
2478
|
}
|
|
2477
2479
|
}
|
|
2478
2480
|
// 监听页面缩放
|