[]ios旋转问题

引擎版本:1.7.5
游戏链接:http://save.api.4399.com/h5/v3/h5-frame/index.php?gameId=100052187&4399id=0&wap=1
问题描述:旋转之后只能看到游戏一部分
适配代码:
var width:Number	= Browser.width;
var height:Number = Browser.height;

if (width > height)
{
width = height;
height = Browser.width;
}

/*if (width > height)
{
width = height;
height = Browser.width;
}

if (width != 640)
{
var ratio:Number = width / 640;
width = 640;
height = Math.floor(height / ratio);
}


if (height > 1280)
height = 1280;
else if (height < 960)
height = 960;*/

var browerRatio:Number = width / height ;

if( height != 1136 )
{
// w 640
// h 1136
var ratioW:Number = height / 1136 ;

height = 1136 ;
width = Math.floor( width / ratioW ) ;
}

if( width < 640 )
{
width = 640 ;
}
else if( width > 720 )
{
width = 720 ;
}

if( height > 1280 )
{
height = 1280 ;
}
else if( height < 960 )
{
height = 960 ;
}

Global.GAME_WIDTH = width;
Global.GAME_HEIGHT = height;

Config.atlasEnable = true;
Config.isAlpha = true;

Laya.init(Global.GAME_WIDTH, Global.GAME_HEIGHT, WebGL);


Laya.stage.alignV = Stage.ALIGN_MIDDLE;
Laya.stage.alignH = Stage.ALIGN_CENTER;
Laya.stage.bgColor = "none";
Config.atlasEnable = true;
if( browerRatio > 0.5 && browerRatio < 0.6 )
{
Laya.stage.scaleMode = Stage.SCALE_EXACTFIT ;
}
else
{
Laya.stage.scaleMode = Stage.SCALE_SHOWALL;
}
Laya.stage.screenMode = Stage.SCREEN_VERTICAL;
已邀请:

Monica - 知识达人

赞同来自:

这个问题建议你先跟平台那边沟通下,看是不是他们iframe的兼容性问题。因为只有这一个平台上有这个问题...

要回复问题请先

商务合作
商务合作