ಮಾಡ್ಯೂಲ್:Location map/sandbox: ಪರಿಷ್ಕರಣೆಗಳ ನಡುವಿನ ವ್ಯತ್ಯಾಸ
Content deleted Content added
Jackmcbarn (ಚರ್ಚೆ | ಕಾಣಿಕೆಗಳು) redo experimental size reductions |
Fixing content model |
||
೧೫೮ ನೇ ಸಾಲು:
end
local retval = args.float == 'center' and '<div class="center">' or ''
if args.caption and args.caption ~= '
retval = retval .. '<div class="noviewer thumb '
if args.float == '"left"' or args.float == 'left' then
೨೧೨ ನೇ ಸಾಲು:
local retval = '</div>'
if not args.caption
else▼
▲ retval = retval .. '<div style="font-size:90%;padding-top:3px">'
▲ .. (args.caption or (args.label or mw.title.getCurrentTitle().text) .. ' (' .. map('name') .. ')')
.. '</div>'
elseif args.caption
retval = retval .. '<div style="font-size:90%;padding-top:3px"></div>'
-- This is not the pipe trick. We're creating a link with no text on purpose, so that CSS can give us a nice image
retval = retval .. '<div class="thumbcaption"><div class="magnify">[[:File:' .. getContainerImage(args, map) .. '| ]]</div>' .. args.caption .. '</div>'
Line ೨೫೦ ⟶ ೨೪೭:
local function markOuterDiv(x, y, imageDiv, labelDiv)
return mw.html.create('div')
:cssText('position:absolute;top:' .. round(y, 3) .. '%;left:' .. round(x, 3) .. '%;height:0;width:0;margin:0;padding:0')
:node(imageDiv)
:node(labelDiv)
Line ೨೫೭ ⟶ ೨೫೪:
local function markImageDiv(mark, marksize, label, link, alt, title)
local builder = mw.html.create('div')
:cssText('position:absolute;text-align:center;left:-' .. round(marksize / 2) .. 'px;top:-' .. round(marksize / 2) .. 'px;width:' .. marksize .. 'px;font-size:' .. marksize .. 'px;line-height:0')
:attr('title', title)
if marksize ~= 0 then
Line ೨೭೪ ⟶ ೨೭೧:
local function markLabelDiv(label, label_size, label_width, position, background, x, marksize)
local builder = mw.html.create('div')
:cssText('font-size:' .. label_size .. '%;line-height:110%;position:absolute;width:' .. label_width .. 'em')
Line ೩೩೨ ⟶ ೩೨೬:
-- If they didn't provide either coordinate, try Wikidata. If they provided one but not the other, don't.
local entity = mw.wikibase.getEntity()
if entity and entity.claims and entity.claims.
local value = entity.claims.
longitude, latitude = value.longitude, value.latitude
end
|