Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images sometimes not justifying #20

Open
skitterm opened this issue Jul 14, 2016 · 3 comments
Open

Images sometimes not justifying #20

skitterm opened this issue Jul 14, 2016 · 3 comments

Comments

@skitterm
Copy link

As I resize, I occasionally see spots where the images don't interlock nicely, as shown below:
issue

I refresh the browser at the same size, and sometimes the issue is fixed, and sometimes it still looks this way.

@x00
Copy link

x00 commented Dec 20, 2016

have similar issues. Seem to depend on if the images are cached or not.

@x00
Copy link

x00 commented Dec 20, 2016

you have to use this in the footer rather than jQuery(document).ready(function($){. otherwise very hit an miss. In fact I had use setInterval with my rendering function to get any kind of consistency.

@ghost
Copy link

ghost commented Jun 28, 2018

I had a different problem that was related to resizing. What i've done is to refresh the plugin when resizing. For performance reasons i've created a small script that only fires when resizing have stopped. You can call the plugin like this (this snippet replaces you initial call … it does the loading and resizing call):

// Flex images

var flexOptions = {

	container: '.image',
	object: 'img',
	rowHeight: 150,
	truncate: false,

}

jQuery( window ).resize(function() {

    if( this.resizestop ) clearTimeout( this.resizestop );

    this.resizestop = setTimeout( function() {

        jQuery( this ).trigger( 'resizestop' );

    }, 200 );

} );

jQuery( window ).bind( 'resizestop load', function() {

    jQuery( '#imagelist' ).flexImages( flexOptions );

} );

Hope this helps ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants