Skip to content

Commit

Permalink
Fix issue with URL params not updating when un-maximizing a module.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
iftenney authored and LIT team committed Feb 16, 2024
1 parent d3980cc commit 406fbc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lit_nlp/client/core/widget_group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ export class WidgetGroup extends ReactiveElement {

// Maximization.
const onMaxClick = () => {
this.maximized = !this.maximized;
this.setMaximized(this.maximized);
this.setMaximized(!this.maximized);
this.setMinimized(false);
};

Expand All @@ -114,7 +113,7 @@ export class WidgetGroup extends ReactiveElement {
const onTitleClick = () => {
if (this.minimized) {
this.setMinimized(false);
this.maximized = false;
this.setMaximized(false);
}
};

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

0 comments on commit 406fbc7

Please sign in to comment.