|
|
|
@ -19,7 +19,7 @@ var dAttributeFunction = d3.geoPath()
|
|
|
|
d3.selectAll('path').attr('d', dAttributeFunction);
|
|
|
|
d3.selectAll('path').attr('d', dAttributeFunction);
|
|
|
|
|
|
|
|
|
|
|
|
var dragBehavior = d3.drag() //create a drag behavior
|
|
|
|
var dragBehavior = d3.drag() //create a drag behavior
|
|
|
|
.on('start', function(event){
|
|
|
|
.on('start', (event) => {
|
|
|
|
d3.select('table tr:nth-child(2) td:first-child')
|
|
|
|
d3.select('table tr:nth-child(2) td:first-child')
|
|
|
|
.html(worldProjection.invert([event.x, event.y])[0])
|
|
|
|
.html(worldProjection.invert([event.x, event.y])[0])
|
|
|
|
d3.select('table tr:nth-child(2) td:last-child')
|
|
|
|
d3.select('table tr:nth-child(2) td:last-child')
|
|
|
|
@ -30,7 +30,7 @@ var dragBehavior = d3.drag() //create a drag behavior
|
|
|
|
.attr('x', event.x)
|
|
|
|
.attr('x', event.x)
|
|
|
|
.attr('y', event.y);
|
|
|
|
.attr('y', event.y);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.on('drag', function(event){
|
|
|
|
.on('drag', (event) => {
|
|
|
|
d3.select('table tr:nth-child(3) td:first-child')
|
|
|
|
d3.select('table tr:nth-child(3) td:first-child')
|
|
|
|
.html(worldProjection.invert([event.x, event.y])[0])
|
|
|
|
.html(worldProjection.invert([event.x, event.y])[0])
|
|
|
|
d3.select('table tr:nth-child(3) td:last-child')
|
|
|
|
d3.select('table tr:nth-child(3) td:last-child')
|
|
|
|
@ -42,7 +42,7 @@ var dragBehavior = d3.drag() //create a drag behavior
|
|
|
|
|
|
|
|
|
|
|
|
d3.select('svg').call(dragBehavior);
|
|
|
|
d3.select('svg').call(dragBehavior);
|
|
|
|
|
|
|
|
|
|
|
|
d3.select('form').on('submit', function(event){
|
|
|
|
d3.select('form').on('submit', (event) => {
|
|
|
|
event.preventDefault();
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
|
|
|
|
d3.selectAll('rect').remove();
|
|
|
|
d3.selectAll('rect').remove();
|
|
|
|
|