var a = new Laya.Box();
a.left = a.top = a.right = a.bottom = 0;
a.on(Laya.Event.RESIZE, this, () => {
console.warn(" resize ===== ");
})
Laya.stage.addChild(a);
Laya.timer.loop(1000, this, () => {
a.addChild(new Laya.Box());
});
---------------
测试代码如上,每1s会回调一次控件 a 的 RESIZE 方法,这个是否正常?
引擎版本:Laya.version="1.7.22";
---------------
之前的引擎 Laya.version="1.7.17"; 不会出现这个问题,对比发现引擎 1.7.22
Component 中的 changeSize 方法增加了下面的代码引起的
if (this._layout.enable){
this.resetLayoutX();
this.resetLayoutY();
}