You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using multiple grids with same selector, only the last one will be updated on resize. If you have n grids, the last one will be updated n times.
As far as I understand problem is here :
for (var i=0;i<grids.length;i++) {
var grid = grids[i],
[...]
makeGrid(grid, items, o); // <- this call is ok
var tempf = function() { makeGrid(grid, items, o); }; // <- this call will not be ok as it is deferred.
[...]
}
"grid" in this function is not a copy of for loop's "grid", it IS the for loop's "grid". So when the event will be fired later on, grid will always have the current "grid" value of the for loop, which already has ended looping long ago => I will always be the last grid.
I may give this a try, but I do not see an easy fix this evening.
The text was updated successfully, but these errors were encountered:
MonsieurLanza
added a commit
to MonsieurLanza/JavaScript-flexImages
that referenced
this issue
Nov 22, 2016
Hello there,
When using multiple grids with same selector, only the last one will be updated on resize. If you have
n
grids, the last one will be updatedn
times.As far as I understand problem is here :
"grid" in this function is not a copy of for loop's "grid", it IS the for loop's "grid". So when the event will be fired later on, grid will always have the current "grid" value of the for loop, which already has ended looping long ago => I will always be the last grid.
I may give this a try, but I do not see an easy fix this evening.
The text was updated successfully, but these errors were encountered: