Skip to content

Commit

Permalink
gallery: force hide on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jul 17, 2024
1 parent 70fd59c commit 469a766
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/plugins/gallery.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Displays the gallery when loading the first panorama. The user will be able to t
- default: `true`
- updatable: yes

Hides the gallery when the user clicks on an item.
Hides the gallery when the user clicks on an item (forced to `true` on screens < 500px).

#### `thumbnailSize`

Expand Down
2 changes: 1 addition & 1 deletion packages/gallery-plugin/src/GalleryPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class GalleryPlugin extends AbstractConfigurablePlugin<
this.currentId = id;
this.gallery.setActive(id);

if (this.config.hideOnClick) {
if (this.config.hideOnClick || !this.gallery.isAboveBreakpoint) {
this.hide();
}
}
Expand Down

0 comments on commit 469a766

Please sign in to comment.