improve thumbnails creation performances in code
parent
77dcc1c705
commit
ecd8ef6418
|
@ -357,7 +357,7 @@ define([
|
|||
getContainer: getThumbnailContainer,
|
||||
filter: function (el, before) {
|
||||
if (before) {
|
||||
$(el).parents().css('overflow', 'visible');
|
||||
//$(el).parents().css('overflow', 'visible');
|
||||
$(el).css('max-height', Math.max(600, $(el).width()) + 'px');
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -183,8 +183,10 @@ define([
|
|||
allowTaint: true,
|
||||
onrendered: function (canvas) {
|
||||
if (opts.filter) { opts.filter(element, false); }
|
||||
var D = getResizedDimensions(canvas, 'pad');
|
||||
Thumb.fromCanvas(canvas, D, cb);
|
||||
setTimeout(function () {
|
||||
var D = getResizedDimensions(canvas, 'pad');
|
||||
Thumb.fromCanvas(canvas, D, cb);
|
||||
}, 10);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue