* Hide popup * 隐藏弹出窗口
(popup?: GObject)
| 140 | * 隐藏弹出窗口 |
| 141 | */ |
| 142 | public hidePopup(popup?: GObject): void { |
| 143 | if (popup) { |
| 144 | const index = this._popupStack.indexOf(popup); |
| 145 | if (index !== -1) { |
| 146 | this._popupStack.splice(index, 1); |
| 147 | this.closePopup(popup); |
| 148 | } |
| 149 | } else { |
| 150 | // Hide all popups |
| 151 | for (const p of this._popupStack) { |
| 152 | this.closePopup(p); |
| 153 | } |
| 154 | this._popupStack.length = 0; |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | private closePopup(popup: GObject): void { |
| 159 | popup.visible = false; |
no test coverage detected