[]DialogManager设置弹出效果后,第一次能打开,第二次就打不开了。

Dialog.manager.popupEffectHandler = Handler.create(this,(e)=>{
var dialog:Dialog = <Dialog>e;
dialog.y = - dialog.height;
var yy:number = (Laya.stage.height - dialog.height)/2;
Laya.Tween.to(dialog,{y:yy},600,Laya.Ease.backOut);
},[],false);
this.gameHelpDialog = new view.GameHelpDialog();
已邀请:

Monica - 知识达人

赞同来自:

解决方法在这个帖子中:https://ask.layabox.com/question/8786

ayiui4566

赞同来自:

//panels------------------
            Dialog.manager.popupEffectHandler = Handler.create(this,(e)=>{
                var dialog:Dialog = <Dialog>e;
                dialog.y = - dialog.height;
                var yy:number = (Laya.stage.height - dialog.height)/2;
                Laya.Tween.to(dialog,{y:yy},600,Laya.Ease.backOut);
            },[],false);
            Dialog.manager.closeEffectHandler = null;
解决了。closeEffectHandler 设置成null就好了

ayiui4566

赞同来自:

Dialog.manager.popupEffectHandler = Handler.create(this,(e)=>{
                var dialog:Dialog = <Dialog>e;
                dialog.y = - dialog.height;
                var yy:number = (Laya.stage.height - dialog.height)/2;
                Laya.Tween.to(dialog,{y:yy},600,Laya.Ease.backOut);
            },[],false);
            Dialog.manager.closeEffectHandler = Handler.create(this,(e)=>{
                var dialog:Dialog = <Dialog>e;
                Laya.Tween.to(dialog,{y:Laya.stage.height+50},500,Laya.Ease.backOut,Handler.create(this,(e)=>{
                    e.close(false);
                },[dialog]));
            },[],false);
设置完closeEffectHandler 为什么会一直调用里面的函数?

ayiui4566

赞同来自:

//panels------------------
            Dialog.manager.popupEffectHandler = Handler.create(this,(e)=>{
                var dialog:Dialog = <Dialog>e;
                dialog.y = - dialog.height;
                var yy:number = (Laya.stage.height - dialog.height)/2;
                Laya.Tween.to(dialog,{y:yy},600,Laya.Ease.backOut);
            },[],false);
            Dialog.manager.closeEffectHandler = Handler.create(this,(e)=>{
                var dialog:Dialog = <Dialog>e;
                Laya.Tween.to(dialog,{y:Laya.stage.height+50},500,Laya.Ease.backOut);
            },[],false);
            
            this.gameHelpDialog = new view.GameHelpDialog();
关闭的时候关闭不了,还有遮罩在

ymsdandan

赞同来自:

建议你发个完整demo,你这贴代码,我们也没法测试啊

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作