[]模拟器分辨率问题
我用的是mac系统,每次重新启动模拟器的时候,会出现stage的宽高变化了:
printScreenInfo("aaa");
Laya.loader.load(resArr, Handler.create(this, this.onResLoaded, [this.mainuiView, winName, zOrder]));
printScreenInfo("bbb");
private onResLoaded(parent:Laya.Node, winName:string, zOrder:number):void {
printScreenInfo("ccc");
this.doOpen(parent, winName, zOrder);
}
aaa Screen Info: stage=(750,1334), stage design=(750,1334), browser=(300,278), browser client=(300,278), pixel ratio=1
bbb Screen Info: stage=(750,1334), stage design=(750,1334), browser=(300,278), browser client=(300,278), pixel ratio=1
ccc Screen Info: stage=(1236,1334), stage design=(750,1334), browser=(278,300), browser client=(300,278), pixel ratio=1
如上所述: 在加载完的回调那里,stage的宽高发生了变化。
但是如果我点了”重新加载“,刷新一遍的话,就好了:
aaa Screen Info: stage=(750,1334), stage design=(750,1334), browser=(414,741), browser client=(414,741), pixel ratio=1
bbb Screen Info: stage=(750,1334), stage design=(750,1334), browser=(414,741), browser client=(414,741), pixel ratio=1
ccc Screen Info: stage=(750,1342), stage design=(750,1334), browser=(414,741), browser client=(414,741), pixel ratio=1
为什么会这样子的呢?
printScreenInfo("aaa");
Laya.loader.load(resArr, Handler.create(this, this.onResLoaded, [this.mainuiView, winName, zOrder]));
printScreenInfo("bbb");
private onResLoaded(parent:Laya.Node, winName:string, zOrder:number):void {
printScreenInfo("ccc");
this.doOpen(parent, winName, zOrder);
}
aaa Screen Info: stage=(750,1334), stage design=(750,1334), browser=(300,278), browser client=(300,278), pixel ratio=1
bbb Screen Info: stage=(750,1334), stage design=(750,1334), browser=(300,278), browser client=(300,278), pixel ratio=1
ccc Screen Info: stage=(1236,1334), stage design=(750,1334), browser=(278,300), browser client=(300,278), pixel ratio=1
如上所述: 在加载完的回调那里,stage的宽高发生了变化。
但是如果我点了”重新加载“,刷新一遍的话,就好了:
aaa Screen Info: stage=(750,1334), stage design=(750,1334), browser=(414,741), browser client=(414,741), pixel ratio=1
bbb Screen Info: stage=(750,1334), stage design=(750,1334), browser=(414,741), browser client=(414,741), pixel ratio=1
ccc Screen Info: stage=(750,1342), stage design=(750,1334), browser=(414,741), browser client=(414,741), pixel ratio=1
为什么会这样子的呢?
没有找到相关结果
已邀请:
6 个回复
13570957865
赞同来自:
Aar0n
赞同来自:
13570957865
赞同来自:
Aar0n
赞同来自:
Aar0n
赞同来自:
13570957865
赞同来自: