It’s probably causing the Salient Visual Composer, as if I switch this plugin, it shows just right. Any way to solve it PhotoBlocks? Would mean the world to me, I’m really struggling with this one and your plugin is the best I found.
Hi @tadeaskula,
usually this kind of issue are caused by a floating container and it can be fixed by forcing the container to float: none.
At this moment, the only workaround I know is to force a refresh after the plugin has built the grid, you have to add the following code inside the “EVENT: AFTER GALLERY” box:
var e = this;
setTimeout(function () {
jQuery(window).resize();
e.refresh();
}, 10);
Cheers,
Diego
Hello, @greentreelabs,
I added it, but it acts weirdly. Its definitly not responsive at this point. Always some block goes in the wrong place. Can you look at it, please? I could send you the credentials.
Thank you
@greentreelabs
We have come across this issue as well with the latest version of the Plugin.
We have isolated the issue to approx line 206 in the ‘photoblocks-grid-gallery/public/js/photoblocks.public.js’ file
var size = Math.ceil(w / this.settings.columns);
By rounding up, at some resolutions the width of the gallery is greater than the width of the container, therefor the last grid item in a row gets wrapped to the next row.
By replacing this line with var size = (w / this.settings.columns); (removing the Ceil function) it fixes the issue.
I believe the rounding would have been put in place to give nice whole numbers for the width of each grid element, however virtually all modern browsers can easily handle widths specified such as 250.5px etc.
Hopefully this helps with anyone who runs into the same issue.
Thank you very much @aboutimage that’s much appreciated!
I applied the change and it will be in the next update.
Cheers,
Diego