From d4ae936f2a56e062c664eb725e944dd0fbcd940b Mon Sep 17 00:00:00 2001 From: DFB <2576663552@qq.com> Date: Sun, 26 Apr 2020 09:59:23 +0800 Subject: [PATCH] Update DialogManager.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加dialog.closeOnSide配置来控制有些弹窗是否可以点击旁边来关闭 --- src/layaAir/laya/ui/DialogManager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layaAir/laya/ui/DialogManager.ts b/src/layaAir/laya/ui/DialogManager.ts index bd8e956607..725833b27d 100644 --- a/src/layaAir/laya/ui/DialogManager.ts +++ b/src/layaAir/laya/ui/DialogManager.ts @@ -64,7 +64,7 @@ export class DialogManager extends Sprite { private _closeOnSide(): void { var dialog: Dialog = (this.getChildAt(this.numChildren - 1)); - if (dialog instanceof IUI.Dialog) dialog.close(); + if (dialog instanceof IUI.Dialog && dialog.closeOnSide) dialog.close(); } /**设置锁定界面,如果为空则什么都不显示*/ @@ -235,4 +235,4 @@ export class DialogManager extends Sprite { ClassUtils.regClass("laya.ui.DialogManager", DialogManager); -ClassUtils.regClass("Laya.DialogManager", DialogManager); \ No newline at end of file +ClassUtils.regClass("Laya.DialogManager", DialogManager);