X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=include%2Fgallery.js;h=4ea3f2d638d5b9251e4fe29d7b9b291f474d9d1d;hp=08097589d49f25d9a5647556e9a46c9ae6d89e15;hb=bf4ffba811821b98c05460149d8bf2d8cc807a29;hpb=5c58dbcff6c07d9649f124874574f9c0a91b29ac diff --git a/include/gallery.js b/include/gallery.js index 0809758..4ea3f2d 100644 --- a/include/gallery.js +++ b/include/gallery.js @@ -16,8 +16,9 @@ /* Initialize everything, to be called on domready */ function init_gallery() { - /* List of lists of img variations. Each image variation is a three-element - * array: [width, height, url]. Index of the outer array is the global ID. + /* List of lists of img variations. Each image variation is + * a three-element array: [width, height, url]. Index of the + * outer array is the global ID. * * [ * [ id, title, [ @@ -38,12 +39,12 @@ function init_gallery() { $$('div.varimages').each(function(el,i){ rimgs[el.id] = i; - vimgs[i] = []; + vimgs[i] = [el.id, el.title, []]; el.getElements('a').each(function(ael,j){ dim = /(\d+)[^\d](\d+)/.exec(ael.text); w = dim[1]; h = dim[2]; - vimgs[i][j]=[w,h,ael.href,el.id,el.title]; + vimgs[i][2][j]=[w,h,ael.href]; }); });