浏览代码

Hide viewport elements when releasing it

customisations
alemart 11 个月前
父节点
当前提交
4e623ef78d
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 2
    0
      src/core/hud.ts
  2. 3
    0
      src/core/viewport.ts

+ 2
- 0
src/core/hud.ts 查看文件

@@ -110,6 +110,8 @@ export class HUD
110 110
      */
111 111
     _release(): void
112 112
     {
113
+        this.visible = false;
114
+
113 115
         if(this._isOwnContainer) {
114 116
             this._isOwnContainer = false;
115 117
             this._container.remove();

+ 3
- 0
src/core/viewport.ts 查看文件

@@ -250,6 +250,9 @@ class ViewportCanvases
250 250
      */
251 251
     release(): void
252 252
     {
253
+        this._backgroundCanvas.hidden = true;
254
+        this._foregroundCanvas.hidden = true;
255
+
253 256
         this._backgroundCanvas.style.cssText = '';
254 257
         this._foregroundCanvas.style.cssText = this._originalCSSTextOfForegroundCanvas;
255 258
     }

正在加载...
取消
保存