(Translated by https://www.hiragana.jp/)
Module:Multiple image: Difference between revisions - Wikipedia

Module:Multiple image: Difference between revisions

Content deleted Content added
adjust spacing calc
non-negative and make the default 1
Line 82:
local header = pargs['header'] or pargs['title'] or ''
local footer = pargs['footer'] or ''
local imagegap = tonumber(pargs['image_gap'] or '01') or 01
local perrow = nil
local thumbclass = {
Line 130:
end
 
-- make sure the gap is non-negative
if imagegap < 0 then imagegap = 0 end
-- if total_width has been specified, rescale the image widths
local heights = {}
Line 138 ⟶ 141:
for r=1,rowcount do
local koffset = k
local tw = totalwidth - (43 + imagegap) * (perrow[r] - 1) - 12
local ar = {}
local arsum = 0
Line 180 ⟶ 183:
for r=1,rowcount do
if( widthmax == widthsum[r] ) then
bodywidth = widthmax + (43 + imagegap) * (perrow[r] - 1) + 12
end
end
Line 238 ⟶ 241:
imagediv:css('margin', '1px')
if ((imagegap > 0) and (j < perrow[r])) then
imagediv:css('margin-right', tostring(imagegap + 1) .. 'px')
end
local i = imagenumbers[k]