refactor(frontend): 移除缩放逻辑并调整SDK容器样式

将SDK容器的缩放计算逻辑移除,改为固定不缩放
调整SDK容器的CSS样式,使用绝对定位和vh单位
This commit is contained in:
2026-04-30 10:28:53 +08:00
parent bc46246333
commit f0f2ce550a
2 changed files with 8 additions and 19 deletions

View File

@@ -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() {

View File

@@ -550,22 +550,22 @@ body {
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
z-index: 1;
}
.digital-human-box .sdk-scaling-wrapper .sdk-inner {
transform-origin: center center;
width: 100%;
position: absolute;
top: 0;
left: 50%;
height: 100%;
transform: translateX(-50%);
transform-origin: center center;
}
.digital-human-box .sdk-scaling-wrapper .sdk-inner .digital-intelligent-interaction {
width: 100% !important;
height: 100% !important;
width: 177.78vh !important;
height: 100vh !important;
}
/* ===== 覆盖 SDK 字体大小 ===== */