[LayaAir 1.0]舞台的位置怎么自由设定

舞台显示的位置如果要自由的展示在浏览器的任意一个地方要怎么设置? 源码里写死了只有 left right top bottom这几个参数进行组合 比如我想让舞台展示在距离浏览器左边100个像素这种需求。试过通过改变外套的div的位置但是舞台里的坐标就全乱了 
以下是源码里对于舞台位置的实现:
if (this._alignH==="left")this.offset.x=0;
        else if (this._alignH==="right")this.offset.x=screenWidth-realWidth;
        else this.offset.x=(screenWidth-realWidth)*0.5 / pixelRatio;
        if (this._alignV==="top")this.offset.y=0;
        else if (this._alignV==="bottom")this.offset.y=screenHeight-realHeight;
        else this.offset.y=(screenHeight-realHeight)*0.5 / pixelRatio;
已邀请:

CCQ

赞同来自:

if (this._alignH==="left")this.offset.x=0;
        else if (this._alignH==="right")this.offset.x=screenWidth-realWidth;
        //else this.offset.x=(screenWidth-realWidth)*0.5 / pixelRatio;
        else if (this._alignH==="center")this.offset.x=(screenWidth-realWidth)*0.5 / pixelRatio;
        if (this._alignV==="top")this.offset.y=0;
        else if (this._alignV==="bottom")this.offset.y=screenHeight-realHeight;
        //else this.offset.y=(screenHeight-realHeight)*0.5 / pixelRatio;
        else if (this._alignV==="middle")this.offset.y=(screenHeight-realHeight)*0.5 / pixelRatio;
这样修改后是可以通过修改offset的值来控制舞台的位置 但是要改源码 有没有更好的办法 不用改源码的呢?

要回复问题请先

商务合作
商务合作