Skip to content

Commit

Permalink
Modify width default to auto prevent zooming large image bug (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueswen committed Dec 29, 2023
1 parent 2f606bf commit c61c0fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ GLightbox is a pure javascript lightbox library with mobile support.
| loop | false | Loop slides on end. |
| effect | zoom | Name of the effect on lightbox open. (zoom, fade, none) |
| slide_effect | slide | Name of the effect on lightbox slide. (slide, zoom, fade, none) |
| width | 100% | Width for inline elements and iframes. You can use any unit for example 90% or 100vw for full width. |
| width | auto | Width for inline elements and iframes. You can use any unit for example 90% or 100vw for full width. |
| height | auto | Height for inline elements and iframes. You can use any unit for example 90%, 100vh or auto. |
| zoomable | true | Enable or disable zoomable images. |
| draggable | true | Enable or disable mouse drag to go prev and next slide. |
Expand Down
2 changes: 1 addition & 1 deletion mkdocs_glightbox/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class LightboxPlugin(BasePlugin):
"slide_effect",
config_options.Choice(("slide", "zoom", "fade", "none"), default="slide"),
),
("width", config_options.Type(str, default="100%")),
("width", config_options.Type(str, default="auto")),
("height", config_options.Type(str, default="auto")),
("zoomable", config_options.Type(bool, default=True)),
("draggable", config_options.Type(bool, default=True)),
Expand Down
2 changes: 1 addition & 1 deletion schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"title": "Width for inline elements and iframes",
"markdownDescription": "https://blueswen.github.io/mkdocs-glightbox/#usage",
"type": "string",
"default": "100%"
"default": "auto"
},
"height": {
"title": "Height for inline elements and iframes",
Expand Down

0 comments on commit c61c0fa

Please sign in to comment.