refactor(frontend): 移除缩放逻辑并调整SDK容器样式
将SDK容器的缩放计算逻辑移除,改为固定不缩放 调整SDK容器的CSS样式,使用绝对定位和vh单位
This commit is contained in:
@@ -344,18 +344,7 @@ function calculateScale() {
|
||||
|
||||
if (!sdkContainer) return;
|
||||
|
||||
const containerWidth = container.clientWidth;
|
||||
const containerHeight = container.clientHeight;
|
||||
|
||||
const sdkWidth = 1920;
|
||||
const sdkHeight = 1080;
|
||||
|
||||
const scaleX = containerWidth / sdkWidth;
|
||||
const scaleY = containerHeight / sdkHeight;
|
||||
const scale = Math.max(scaleX, scaleY);
|
||||
|
||||
sdkContainer.style.transform = `scale(${scale})`;
|
||||
sdkContainer.style.transformOrigin = 'center center';
|
||||
sdkContainer.style.transform = 'none';
|
||||
}
|
||||
|
||||
function toggleFullscreen() {
|
||||
|
||||
Reference in New Issue
Block a user