diff --git a/d.ts/antos.d.ts b/d.ts/antos.d.ts index 1e58d79..edf1238 100644 --- a/d.ts/antos.d.ts +++ b/d.ts/antos.d.ts @@ -8237,6 +8237,18 @@ declare namespace OS { * @memberof WindowTag */ constructor(); + /** + * 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); + get blur_overlay(): boolean; /** * Init window tag * - `shown`: false diff --git a/release/antos-1.2.1.tar.gz b/release/antos-1.2.1.tar.gz index 615a724..5179279 100644 Binary files a/release/antos-1.2.1.tar.gz and b/release/antos-1.2.1.tar.gz differ diff --git a/src/core/tags/WindowTag.ts b/src/core/tags/WindowTag.ts index b49ba17..22debe5 100644 --- a/src/core/tags/WindowTag.ts +++ b/src/core/tags/WindowTag.ts @@ -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();