Galleria.loadTheme ('js / galleria / themes / classic / galleria.classic.js', {show: curIdx}); .where определяется curIdx ...
у изменить размер всего Galleria DIV и изменить размер всех изображений, динамически генерируемых с помощью сценария Galleria.
пока у меня есть
$(window).resize(function() {
var h = $(window).height();
var galleriaHeight = h-54;
var w = $(".content").width();
var galleriaWidth = w-18;
$("#galleria").height(galleriaHeight);
$("#galleria").width(w);
$(".galleria-stage").height(galleriaHeight);
$(".galleria-stage").width(galleriaWidth);
$(".galleria-images .galleria-image img").css({"max-height":"auto"});
$(".galleria-images .galleria-image img").css({"max-width":galleriaWidth-36});
$(".galleria-stage").height(galleriaHeight);
$(".galleria-stage").width(galleriaWidth);
$(".galleria-container").width(w);
$(".galleria-container").height(galleriaHeight);
$(".caption").width(w);
$(".counter-nav").width(w);
var sidebarHeight =h-54;
var contentHeight =h-36;
$(".sidebar1").height(sidebarHeight);
$(".content").height(contentHeight);
});
Но все масштабируется неравномерно и очень запутано. Посмотрев на полноэкранный код, я также добавил
this.bind(Galleria.RESCALE, function() {
POS = this.getStageHeight() - tab.height() - 2;
thumbs.css('top', OPEN ? POS - list.outerHeight() + 2 : POS);
var img = this.getActiveImage();
if (img)
{
fixCaption(img);
}
});
но это тоже не работает ...
Я предполагаю, что хочу перезагрузить страницу после изменения размера, но на лету ... или изменить размеры всех элементов относительно друг друга, или использовать скрипт изменения размера Galleria ...
Есть идеи?