Browse Source

Hide viewport elements when releasing it

customisations
alemart 11 months ago
parent
commit
4e623ef78d
2 changed files with 5 additions and 0 deletions
  1. 2
    0
      src/core/hud.ts
  2. 3
    0
      src/core/viewport.ts

+ 2
- 0
src/core/hud.ts View File

110
      */
110
      */
111
     _release(): void
111
     _release(): void
112
     {
112
     {
113
+        this.visible = false;
114
+
113
         if(this._isOwnContainer) {
115
         if(this._isOwnContainer) {
114
             this._isOwnContainer = false;
116
             this._isOwnContainer = false;
115
             this._container.remove();
117
             this._container.remove();

+ 3
- 0
src/core/viewport.ts View File

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

Loading…
Cancel
Save