nitinhayaran / Justified.js

jQuery Plugin to create Justified Image Gallery
http://nitinhayaran.github.io/Justified.js/demo/index.html
MIT License
543 stars 97 forks source link

Responsive? #1

Open Cam opened 10 years ago

Cam commented 10 years ago

Hi Nitin. The plugin doesn't appear to be responsive. Can it be made responsive using options? I see no mention of that.

nitinhayaran commented 10 years ago

It is responsive. Ye doesn't resizes itself when you resize your browser, as the grid is adjusted on page load. I will work on it to handle browser resize. You can have a look this example on various browser sizes. (have to refresh the page on resize) http://jsfiddle.net/nitinh/e32nw/3/embedded/result/

Cam commented 10 years ago

Looks promising, but I think to make it really solid it needs to update on resize :)

nitinhayaran commented 10 years ago

Ye I'll work on it.

Cam commented 10 years ago

Cool cool. Shouldn't this "issue" remain open and be set as "enhancement"?

tmconnect commented 9 years ago

I do not want to be impatient, but what is the status about "update on resize" Thanks

nitinhayaran commented 9 years ago

Sorry haven't been able to work on that. Though PR is most welcome.

peterfabian commented 9 years ago

Hi, just a quick and dirty fix can be found in the small mashup I created if you guys are interested... http://peterfabian.github.io/justiswipe_flickr_gallery/

su-narthur commented 7 years ago

@peterfabian Did a little poking around and didn't find your fix. Maybe you could paste the important bits here?

peterfabian commented 7 years ago

@su-narthur as far as I remember, it's a very simple hack, I just tied the window.onresize event to artificialResponsiveness function in flickr.fetch.js in my repo (which just triggers recalculating of the image sizes and positions).

I think there were some subtle bugs when the re-flow happened around margins, so I attempted to fix that with commit 3c33429, so you might want to play with jquery.justified.images.js a bit, too.