Skip to content

Commit

Permalink
Map render update, removed topo dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
braxex committed Jan 26, 2018
1 parent da14fbc commit ffbe936
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
"react-redux": "^5.0.6",
"react-tippy": "^1.2.2",
"react-transition-group": "^2.2.1",
"shapefile": "^0.6.6",
"topojson-client": "^3.0.0",
"topojson-simplify": "^3.0.2"
"shapefile": "^0.6.6"
}
}
6 changes: 3 additions & 3 deletions src/Visualizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class Visualizer extends Component {

setAndSaveMapBox() {
const d3Holder = document.getElementById('D3-holder');
const newMapWidth = d3Holder.offsetWidth -1;
const newMapHeight = d3Holder.offsetHeight -1;
const newMapWidth = d3Holder.offsetWidth -2;
const newMapHeight = d3Holder.offsetHeight -2;
const newMapBox = d3Holder.getBoundingClientRect();

d3.select('#immigration-svg').attr('width', newMapWidth);
Expand Down Expand Up @@ -62,7 +62,7 @@ class Visualizer extends Component {

function initializeD3(worldMap) {
const reactContainer = document.getElementById('D3-holder');
width = reactContainer.offsetWidth-1;
width = reactContainer.offsetWidth-2;
height = reactContainer.offsetHeight-2;

svg = d3.select('#d3-mount-point').append('svg')
Expand Down

0 comments on commit ffbe936

Please sign in to comment.