handleImagesLoaded triggers multiple times
See original GitHub issuehandleImagesLoaded triggers multiple times,
I am using:
onLayoutComplete={handleImagesLoaded}
with function inside the createClass
onLayoutComplete={this.handleImagesLoaded}
it triggers 2 times , otherwise its 4 or 5
Issue Analytics
- State:
- Created 7 years ago
- Comments:15
Top Results From Across the Web
Appending an onload to an image causes the onload event to ...
When you append an image with a onload function with jQuery, the event gets fired multiple times on Android: $('#element').append('<img src="/ ...
Read more >Wait Until All Images are Loaded | Sean C Davis
When we begin, assume no images are loaded. var imagesLoaded = 0; // Count the total number of images on the page when...
Read more >profiles/wcm_base/libraries/jquery.imagesloaded ...
A jQuery plugin that triggers a callback after all the selected/child images have been loaded. Because you can't do .load() on cached images....
Read more >Picture perfect images with the modern <img> element
[Ed. note: While we take some time to rest up over the holidays and prepare for next year ... Images can impact the...
Read more >Update Masonry (v3.3.2) & imagesLoaded (v3.2.0) package
It would be good to check how many themes are using imagesloaded when using the masonry handle. // Masonry v2 depended on jQuery....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@arpecop @indapublic I don’t think this is a bug in Masonry or React Masonry Component.
the
layoutcomplete
event fires every time Masonry completes a layout. Do you find your layout updates several times on screen? This can happen as images are downloaded.If you want to capture 1 event every X seconds etc, you could try using Lodash’s throttle or debounce functions.
http://masonry.desandro.com/events.html#layoutcomplete
Here is the illustration of the problem