🌍
English
Hello
I'm using piwigo 14.5.0 with Bootstrap Darkroom and GThumb+.
Found than the GThumb+ sometimes goes into infinite recursion when recalculating thumbnail grid.
As far as i understand it happens depending on the page size in pixels, but i have not found the exact reason.
I'm not a JS programmer, but I tried to fix this problem.
Changes in gthumb.js i made to avoid infinite recursion:
build: function () { ... GThumb.process(2); }, process: function(max_recursion) { //<- add new parameter var width_count = GThumb.margin; var line = 1; var round_rest = 0; var main_width = jQuery('#thumbnails').width(); var first_thumb = jQuery('#thumbnails img.thumbnail:first'); var best_size = {width:1,height:1}; if(max_recursion <= 0) return;//<- verify value .... if (main_width != jQuery('#thumbnails').width()) { GThumb.process(max_recursion - 1);//<- decrease max_recursion when making recursive call } },
Offline
Yup, for me also that plugin was not working properly after the recent upgrades.
I switched to this :
gdThumb
It works perfectly fine for generating thumbnails. I have generated over 300 in one go, it just works.
Offline