lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.14k stars 1.77k forks source link

fix: use max[Width|Height] when fitImagesInViewport is false #660

Closed k-iwanishi closed 5 years ago

k-iwanishi commented 5 years ago

Pull Requests are welcome. But v2 of Lightbox is in Maintenance Mode. No new features are planned. See the Roadmap.

PRs submitted will still be reviewed and kept open for others to utilize.

Hi, I like lightbox.

When fitImagesInViewport option is false, maxWidth and maxHeight is ignore. But I want to use the following option for large and long image(e.g.: 1920x4320).

lightbox.option({
  'fitImagesInViewport': false,
  'maxWidth': 800
})

This PR modify to use maxWidth and maxHeight when fitImagesInViewport is false.

lokesh commented 5 years ago

@k-iwanishi thanks for catching this bug and making the PR. 🙏

I'm going to merge and do a patch release today.