From 74d0b066e9b6d1e434e1bb5f31b29440b5a24b69 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Wed, 16 Sep 2020 14:52:19 +0800 Subject: [PATCH] overview: Add a 'closing' getter Which better communicates what we are checking for, and is a little more elegant than repeatedly writing: ``` Main.overview.animationInProgress && Main.overview.visibleTarget == false ``` Part-of: --- js/ui/overview.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/ui/overview.js b/js/ui/overview.js index c71b11389..12b966927 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -134,6 +134,10 @@ var Overview = class { return this._visibleTarget; } + get closing() { + return this._animationInProgress && !this._visibleTarget; + } + _createOverview() { if (this._overview) return;