ಮಾಡ್ಯೂಲ್: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 = args.floatframe:extensionTag{name == 'centertemplatestyles', andargs '<div= {src class="center"> 'Template:Location or 'map/styles.css'}}
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('position:absolute;top:' .. round(y, 3) .. '%;left:' .. round(x, 3) .. '%')
:node(imageDiv)
:node(labelDiv)
Line ೨೮೬ ⟶ ೨೯೦:
local function markImageDiv(mark, marksize, label, link, alt, title)
local builder = mw.html.create('div')
:addClass('id')
:cssText('position:absolute;left:-' .. round(marksize / 2) .. 'px;top:-' .. round(marksize / 2) .. 'px;line-height:0')
: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'):cssTextaddClass('font-size:0%;position:absolutel0'):wikitext(label)
end
local builder = mw.html.create('div')
:cssText('font-size:' .. label_size .. '%;line-height:110%;position:absolute;width:' .. label_width .. 'em')
local distance = round(marksize / 2 + 1)
local spanCss
if position == 'top' then -- specified top
builder:addClass('pv'):cssText('bottom:' .. distance .. 'px;left:' .. (-label_width / 2) .. 'em;text-align:center')
elseif position == 'bottom' then -- specified bottom
builder:addClass('pv'):cssText('top:' .. distance .. 'px;left:' .. (-label_width / 2) .. 'em;text-align:center')
elseif position == 'left' or (tonumber(x) > 70 and position ~= 'right') then -- specified left or autodetected to left
builder:cssTextaddClass('toppl'):-0.75em;cssText('right:' .. distance .. 'px;text-align:right')
spanCss = 'float:right'
else -- specified right or autodetected to right
builder:cssTextaddClass('toppr'):-0.75em;cssText('left:' .. distance .. 'px;text-align:left')
spanCss = 'float:left'
end
builder = builder:tag('div')
:css('display', 'inline')
:cssText('padding:1px')
:cssText(spanCss)
:wikitext(label)
if background then
Line ೪೬೧ ⟶ ೪೬೦:
mw.logObject(args, 'args')
if currentTitle.namespace == 0 then
local key = mw.title.getCurrentTitle()currentTitle.prefixedText
builder:wikitext('[[Category:Location maps with marks outside map and outside parameter not set|' .. key .. ' ]]')
end
"https://kn.wikipedia.org/wiki/ಮಾಡ್ಯೂಲ್:Location_map" ಇಂದ ಪಡೆಯಲ್ಪಟ್ಟಿದೆ