enable setting blur overlay window

This commit is contained in:
Dany LE
2021-10-24 18:34:08 +02:00
parent 52709d5da4
commit 99e0d02581
3 changed files with 31 additions and 1 deletions

View File

@ -80,6 +80,23 @@ namespace OS {
super();
}
/**
* blur overlay: If active the window overlay will be shown
* on inactive (blur event)
*
* Setter: Enable the switch
*
* Getter: Check whether the switch is enabled
*
* @memberof WindowTag
*/
set blur_overlay(v: boolean) {
this.attsw(v, "blur-overlay");
}
get blur_overlay(): boolean {
return this.hasattr("blur-overlay");
}
/**
* Init window tag
* - `shown`: false
@ -296,7 +313,8 @@ namespace OS {
this.observable.on("blur", () => {
this._shown = false;
$(this).addClass("unactive");
$(this.refs.win_overlay).show();
if(this.blur_overlay)
$(this.refs.win_overlay).show();
});
this.observable.on("hide", () => {
$(this).hide();