File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -165,17 +165,20 @@ export class SidePanelHandler extends PanelHandler {
165
165
* if there is no most recently used.
166
166
*/
167
167
expand ( id ?: string ) : void {
168
- if ( this . _currentWidget ) {
169
- this . collapse ( ) ;
170
- }
171
168
if ( id ) {
172
- this . activate ( id ) ;
173
- } else {
174
- const visibleWidget = this . currentWidget ;
175
- if ( visibleWidget ) {
176
- this . _currentWidget = visibleWidget ;
177
- this . activate ( visibleWidget . id ) ;
169
+ if ( this . _currentWidget && this . _currentWidget . id === id ) {
170
+ this . collapse ( ) ;
171
+ this . hide ( ) ;
172
+ } else {
173
+ this . collapse ( ) ;
174
+ this . hide ( ) ;
175
+ this . activate ( id ) ;
176
+ this . show ( ) ;
178
177
}
178
+ } else if ( this . currentWidget ) {
179
+ this . _currentWidget = this . currentWidget ;
180
+ this . activate ( this . _currentWidget . id ) ;
181
+ this . show ( ) ;
179
182
}
180
183
}
181
184
You can’t perform that action at this time.
0 commit comments