Commit 1527f8b9 authored by rockyl's avatar rockyl

修复输入框定位问题

parent 0ae2d7c5
{"id":"engine","url":"engine.d2f4eafa108b00ed5ac00e2d30ee98f8af4a9118.js"} {"id":"engine","url":"engine.7b5a9a2397ef665754752460dc5577477fa42a1e.js"}
\ No newline at end of file \ No newline at end of file
...@@ -556,7 +556,7 @@ export class Stage extends Container { ...@@ -556,7 +556,7 @@ export class Stage extends Container {
* @return {{w: number, h: number}} * @return {{w: number, h: number}}
*/ */
public getRootDivWH(div: HTMLDivElement) { public getRootDivWH(div: HTMLDivElement) {
let sw = div.style.width; /*let sw = div.style.width;
let sh = div.style.height; let sh = div.style.height;
let iw = document.body.clientWidth; let iw = document.body.clientWidth;
// let ih = document.body.clientHeight-40; // let ih = document.body.clientHeight-40;
...@@ -577,7 +577,11 @@ export class Stage extends Container { ...@@ -577,7 +577,11 @@ export class Stage extends Container {
vH *= ih / 100; vH *= ih / 100;
} }
} }
return {w: vW, h: vH}; return {w: vW, h: vH};*/
let divBound = div.getBoundingClientRect();
let w = divBound.width;
let h = divBound.height;
return {w, h};
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment