Widget:Test1: Difference between revisions
From International Robin Hood Bibliography
mNo edit summary |
mNo edit summary |
||
Line 239: | Line 239: | ||
m.makeResponsive = function(div, svg) { | m.makeResponsive = function(div, svg) { | ||
console.log("OK"); | |||
var container = d3.select(svg.node().parentNode); | var container = d3.select(svg.node().parentNode); | ||
var w = parseInt(svg.style("width")); | var w = parseInt(svg.style("width")); | ||
Line 275: | Line 276: | ||
features = svg.append("g").attr("class","features"); | features = svg.append("g").attr("class","features"); | ||
tooltip = d3.select("body").append("div").attr("class","ttip"); | tooltip = d3.select("body").append("div").attr("class","ttip"); | ||
d3.xml("/wiki/geo/england/country/England.svg",function(error,geodata) { | d3.xml("/wiki/geo/england/country/England.svg",function(error,geodata) { | ||
if (!error) { | if (!error) { | ||
Line 289: | Line 289: | ||
}); | }); | ||
tooltipOffset = {x: 5, y: -25}; | tooltipOffset = {x: 5, y: -25}; | ||
m.makeResponsive(div, svg); | |||
} | } | ||
Revision as of 16:34, 22 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.