to:sync
This commit is contained in:
parent
052fe1a496
commit
2586df078b
@ -332,15 +332,15 @@ export class MyUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let curDoc = document.documentElement;//当前文档的 root 元素
|
// let curDoc = document.documentElement;//当前文档的 root 元素
|
||||||
let curClientW = curDoc.clientWidth;
|
// let curClientW = curDoc.clientWidth;
|
||||||
if (!curClientW) {
|
// if (!curClientW) {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
let designWidth = window.myEdit.ctx.designWith;
|
// let designWidth = window.myEdit.ctx.designWith;
|
||||||
//set 1rem = viewWidth/10 (支持响应式)
|
// //set 1rem = viewWidth/10 (支持响应式)
|
||||||
let scaleFactor = curClientW / designWidth;
|
// let scaleFactor = curClientW / designWidth;
|
||||||
|
|
||||||
let myEditFrontSize = document.getElementById("myEdit_main");
|
let myEditFrontSize = document.getElementById("myEdit_main");
|
||||||
// if (document.documentElement.clientWidth <= 720) {
|
// if (document.documentElement.clientWidth <= 720) {
|
||||||
@ -349,12 +349,12 @@ export class MyUtils {
|
|||||||
// myEditFrontSize.style.fontSize = window.myEdit.ctx.editFrontSize * dpr + 'px';
|
// myEditFrontSize.style.fontSize = window.myEdit.ctx.editFrontSize * dpr + 'px';
|
||||||
// }
|
// }
|
||||||
// myEditFrontSize.style.fontSize = window.myEdit.ctx.editFrontSize * dpr + 'px';
|
// myEditFrontSize.style.fontSize = window.myEdit.ctx.editFrontSize * dpr + 'px';
|
||||||
myEditFrontSize.style.fontSize = window.myEdit.ctx.editFrontSize * scaleFactor + 'px';
|
myEditFrontSize.style.fontSize = '16px';
|
||||||
|
|
||||||
|
|
||||||
console.log("myEditFrontSize: ", myEditFrontSize.style.fontSize);
|
// console.log("myEditFrontSize: ", myEditFrontSize.style.fontSize);
|
||||||
let testDiv = document.getElementById("testDevice");
|
let testDiv = document.getElementById("testDevice");
|
||||||
testDiv.innerText += "\nmyEditFrontSize:" + myEditFrontSize.style.fontSize;
|
testDiv.innerText += "\ndpr:" + dpr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user