We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Tab.isActive
1 parent a567d36 commit 33feff9Copy full SHA for 33feff9
1 file changed
examples/jsm/inspector/ui/Tab.js
@@ -40,7 +40,7 @@ export class Tab extends EventDispatcher {
40
this.content.id = `${this.id}-content`;
41
this.content.className = 'profiler-content';
42
43
- this.isActive = false;
+ this._isActive = false;
44
this.isVisible = true;
45
this.isDetached = false;
46
this.detachedWindow = null;
@@ -60,6 +60,22 @@ export class Tab extends EventDispatcher {
60
61
}
62
63
+ get isActive() {
64
+
65
+ const isProfilerVisible = this.profiler && this.profiler.panel.classList.contains( 'visible' );
66
67
+ if ( ! isProfilerVisible ) return false;
68
69
+ return this.isDetached || this._isActive;
70
71
+ }
72
73
+ set isActive( value ) {
74
75
+ this._isActive = value;
76
77
78
79
init( /*inspector*/ ) { }
80
81
update( /*inspector*/ ) { }
0 commit comments