ಮಾಡ್ಯೂಲ್:Location map: ಪರಿಷ್ಕರಣೆಗಳ ನಡುವಿನ ವ್ಯತ್ಯಾಸ
Content deleted Content added
avoid an unnecessary call to frame:preprocess |
From sandbox: use TemplateStyles to significantly reduce the post-expand include size |
||
೧೬೨ ನೇ ಸಾಲು:
end
end
local retval =
if args.float == 'center' then
retval = retval .. '<div class="center">'
end
if args.caption and args.caption ~= '' and args.border ~= 'infobox' then
retval = retval .. '<div class="locmap noviewer thumb '
if args.float == '"left"' or args.float == 'left' then
retval = retval .. 'tleft'
Line ೧೮೦ ⟶ ೧೮೩:
retval = retval .. '"><div style="position:relative;width:' .. width .. 'px' .. (args.border ~= 'none' and ';border:1px solid lightgray">' or '">')
else
retval = retval .. '<div class="locmap" style="width:' .. width .. 'px;'
if args.float == '"left"' or args.float == 'left' then
retval = retval .. 'float:left;clear:left'
Line ೨೭೯ ⟶ ೨೮೨:
local function markOuterDiv(x, y, imageDiv, labelDiv)
return mw.html.create('div')
:addClass('od')
:cssText('
:node(imageDiv)
:node(labelDiv)
Line ೨೮೬ ⟶ ೨೯೦:
local function markImageDiv(mark, marksize, label, link, alt, title)
local builder = mw.html.create('div')
:addClass('id')
:cssText('
:attr('title', title)
if marksize ~= 0 then
Line ೩೦೪ ⟶ ೩೦೯:
local function markLabelDiv(label, label_size, label_width, position, background, x, marksize)
if tonumber(label_size) == 0 then
return mw.html.create('div'):
end
local builder = mw.html.create('div')
:cssText('font-size:' .. label_size .. '%
local distance = round(marksize / 2 + 1)
if position == 'top' then -- specified top
builder:addClass('pv'):cssText('bottom:' .. distance .. 'px;left:' .. (-label_width / 2) .. 'em
elseif position == 'bottom' then -- specified bottom
builder:addClass('pv'):cssText('top:' .. distance .. 'px;left:' .. (-label_width / 2) .. 'em
elseif position == 'left' or (tonumber(x) > 70 and position ~= 'right') then -- specified left or autodetected to left
builder:
else -- specified right or autodetected to right
builder:
end
builder = builder:tag('div')
:wikitext(label)
if background then
Line ೪೬೧ ⟶ ೪೬೦:
mw.logObject(args, 'args')
if currentTitle.namespace == 0 then
local key =
builder:wikitext('[[Category:Location maps with marks outside map and outside parameter not set|' .. key .. ' ]]')
end
|