Skip to content

Commit 406fbc7

Browse files
iftenneyLIT team
authored andcommitted
Fix issue with URL params not updating when un-maximizing a module.
Previously, this did not clear the expanded_module= bit, so sharing a link or refreshing the page would cause the module to maximize again. PiperOrigin-RevId: 607529159
1 parent d3980cc commit 406fbc7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lit_nlp/client/core/widget_group.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ export class WidgetGroup extends ReactiveElement {
9999

100100
// Maximization.
101101
const onMaxClick = () => {
102-
this.maximized = !this.maximized;
103-
this.setMaximized(this.maximized);
102+
this.setMaximized(!this.maximized);
104103
this.setMinimized(false);
105104
};
106105

@@ -114,7 +113,7 @@ export class WidgetGroup extends ReactiveElement {
114113
const onTitleClick = () => {
115114
if (this.minimized) {
116115
this.setMinimized(false);
117-
this.maximized = false;
116+
this.setMaximized(false);
118117
}
119118
};
120119

@@ -220,7 +219,8 @@ export class WidgetGroup extends ReactiveElement {
220219
// For clicks on the maximized-module darkened background, undo the
221220
// module maximization.
222221
const onBackgroundClick = () => {
223-
this.maximized = false;
222+
this.setMaximized(false);
223+
this.setMinimized(false);
224224
};
225225
// A listener to stop clicks on a maximized module from causing the
226226
// background click listener from firing.

0 commit comments

Comments
 (0)