Widget:PlaceNamesNavigationMapEnglish: Difference between revisions
From International Robin Hood Bibliography
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<noinclude><div class="no-img">This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.</div></noinclude><includeonly><div id="navMapNav"></div><script> | <noinclude><div class="no-img">This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.</div></noinclude><includeonly><div id="navMapNav"></div><script> | ||
//Utility | //Utility | ||
( function() { | ( function() { | ||
Line 260: | Line 251: | ||
svg.attr("width", targetWidth); | svg.attr("width", targetWidth); | ||
svg.attr("height", Math.round(targetWidth / aspect)); | svg.attr("height", Math.round(targetWidth / aspect)); | ||
container.attr("height", Math.round(targetWidth / aspect)); | |||
} | } | ||
} | } | ||
Line 398: | Line 390: | ||
get("choroMap").style.backgroundColor = "#f2f2f2"; | get("choroMap").style.backgroundColor = "#f2f2f2"; | ||
}; | }; | ||
n.toggleNav = function() { | n.toggleNav = function() { | ||
Line 419: | Line 406: | ||
get("map_leaflet_1").style.display = "block"; | get("map_leaflet_1").style.display = "block"; | ||
w.maps.resizeMaps(); | w.maps.resizeMaps(); | ||
} else if (t === "nmnNav") { | } else if (t === "nmnNav") { | ||
get("navMap").style.display = "block"; | get("navMap").style.display = "block"; | ||
Line 467: | Line 453: | ||
script.type = 'text/javascript'; | script.type = 'text/javascript'; | ||
script.src = "https://www.irhb.org/wiki/js/d3js/d3.v3.min.js"; | script.src = "https://www.irhb.org/wiki/js/d3js/d3.v3.min.js"; | ||
script.onload = w.nav.prepareNav; | script.onload = w.nav.prepareNav; | ||
document.head.appendChild(script); | document.head.appendChild(script); |
Revision as of 19:43, 25 May 2019
This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.