mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-07-09 06:02:49 +08:00
fix(phone-image): 修复字号倍数影响编辑器+刷新后丢失
- CSS变量 --pi-font-scale 仅在渲染容器上设置,不再全局污染 - Slider松手后立即保存配置,确保fontScale持久化
This commit is contained in:
@@ -80,7 +80,10 @@ var PhoneImageEngine = (function () {
|
||||
*/
|
||||
function applyFontScale() {
|
||||
var scale = config.fontScale || 1;
|
||||
document.documentElement.style.setProperty('--pi-font-scale', scale);
|
||||
var preview = document.getElementById('render-preview');
|
||||
if (preview) preview.style.setProperty('--pi-font-scale', scale);
|
||||
var staging = document.getElementById('render-staging');
|
||||
if (staging) staging.style.setProperty('--pi-font-scale', scale);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user