austinthedeveloper / md-lightbox

A lightbox directive for Angular Material
GNU General Public License v2.0
6 stars 1 forks source link

No option for different src #1

Open 21stcn opened 8 years ago

21stcn commented 8 years ago

Thanks for making this module.

I think a vital option you are missing is to provide a different image for the lightbox itself. Lightbox's are generally used to open a bigger version of the image. In my use case, I have a thumbnail image which has a small size for page loading, and only if the user clicks/touches the thumbnail should the full resolution image be loaded.

You can imagine in a photography gallery scenario, where your large images are a couple megabytes, you don't want those loaded and downscaled by the browser for each thumb. Hence the need for a lightbox.

I appreciate how lightweight your directive is and I will be adding to it but you might want to include this option yourself.

thatchej commented 8 years ago

@21stcn I will be using this module in the next couple days and I'm pretty sure it will be a one or two line fix to get the functionality that you(and I) are looking for.

I will open a pull request after I've made the fix

thatchej commented 8 years ago

@21stcn Made a plunkr with what I intend to do with it when I start using it. @austinthedeveloper let me know if you want me to open a pull request, or if you prefer your module as is

http://embed.plnkr.co/tJAfEV4Qlh9sM3IDRw7X

austinthedeveloper commented 8 years ago

Looks good to me. Open a pull-request and I'll review it.

thatchej commented 8 years ago

@austinthedeveloper ok sounds good I will open one in the next few days. that initial plunkr technically works, but isn't responsive and leads to some awkward scrolling in the lightbox on small screens. I want to see what I can do about that