We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbea183 commit 3c30bd7Copy full SHA for 3c30bd7
plugins/ppt/mobilebone.ppt.js
@@ -112,11 +112,18 @@ if (window.Mobilebone && Mobilebone.support) {
112
}
113
};
114
115
+ var eleContent = document.querySelector(".content");
116
// 确定缩放比例
117
var funGetScale = function() {
118
var width = window.innerWidth, height = window.innerHeight;
- var scaleWidth = width / 1024,
119
- scaleHeight = height / 768;
+ var sizeX = 1024; sizeY = 768, styleContent = {};
120
+ if (eleContent) {
121
+ styleContent = window.getComputedStyle(eleContent);
122
+ sizeX = parseInt(styleContent.width);
123
+ sizeY = parseInt(styleContent.height);
124
+ }
125
+ var scaleWidth = width / sizeX,
126
+ scaleHeight = height / sizeY;
127
return Math.min(scaleWidth, scaleHeight).toFixed(2);
128
129
0 commit comments