dejanstojanovic / Facebook-Album-Browser

jQuery plugin for browsing public albums of a Facebook account
http://dejanstojanovic.github.io/Facebook-Album-Browser/
MIT License
74 stars 42 forks source link

Thumbnail Size #31

Closed iarry closed 8 years ago

iarry commented 8 years ago

I increased the size of the fb-photo-thumb class in css to be 234x234 px. Now the thumbnail src image is still being scaled down to a smaller size, usually 130x130 px.

iarry commented 8 years ago

Found the section bumping down albumImg and fixed it.

dejanstojanovic commented 8 years ago

Hi @iarry, can you post the snippet of code you modified, just in case someone needs to make the same adjustment?

Thank you in advance

iarry commented 8 years ago

Absolutely. I changed the for loop on line 313 to compare sizes with the size I wanted instead of photoListItem's height and width.

Originally it was

for (i = 0; i < $(result.data)[a].images.length; i++) {
                                    if (
                                            ($(result.data)[a].images[i].height >= prefHeight && $(result.data)[a].images[i].width >= prefWidth) &&
                                            ($(result.data)[a].images[i].height <= albumImg.height && $(result.data)[a].images[i].width <= albumImg.width)
                                        ) {
                                        albumImg = $(result.data)[a].images[i];
                                    }
                                }

I changed the 3rd line to: ($(result.data)[a].images[i].height >= 200 && $(result.data)[a].images[i].width >= 200) &&

There's probably a better way than just hard coding it, but I'm very new to jQuery and just needed a quick fix.

dejanstojanovic commented 8 years ago

Thanks man. I might add it as an option for plugin