Skip to content

Commit

Permalink
Create save point
Browse files Browse the repository at this point in the history
  • Loading branch information
braxex committed Jan 12, 2018
1 parent fb127e4 commit 5e00ec7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class App extends Component {
dataYear: this.props.yearBounds[0],
isPlaying: false,
hoverCountry: null,
modal: true, //set to true before prod
modal: false, //set to true before prod
};
this.props.lprItems.forEach(function(item) {
initialState.LPR[item.name] = {checkedStatus: true};
Expand Down
4 changes: 2 additions & 2 deletions src/Visualizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let worldMap, svg, g, geoPath, projection, sumSelected, tempdat, selData;
let width, height = 0;
let subtotalKeys = ['immediateRelative','familySponsored','employmentBased','refugeeAsylee','diversityLottery','otherLPR'];

export function passFiles(datums, map) {
export function passFiles(datums, map) { //**
tempdat = datums;
worldMap = map;
}
Expand Down Expand Up @@ -64,7 +64,7 @@ class Visualizer extends Component {
componentDidMount() {
const self = this;

function checkForData() {
function checkForData() { //**
if (tempdat === undefined) {
} else {
clearInterval(checkInterval)
Expand Down
5 changes: 3 additions & 2 deletions src/formulas.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function handleMouseover(d, i, sumSelected, saveState, countryDOM) {
if (d.immigrationData === undefined) {
console.log('no immigration data for current year')
} else {
//log country data on mouseover
//log country data on mouseover -- BUG1 -- still a bug -- feature to be deleted anyway
var selCountry = countryData.find(item => item.id === d.id).immigrationData;
console.log(selCountry.countryName+": "+(selCountry.selectedTotal).toLocaleString()+' people; '+(Math.round((((selCountry.selectedTotal)/immSum)*100)*100)/100).toLocaleString()+'%');
}
Expand Down Expand Up @@ -45,7 +45,8 @@ export function handleMouseout(d, i, sumSelected, saveState, countryDOM) {
.data(selData)
.enter()
.append('path')
.attr('fill', function(d) {return fillChoropleth(d,rdState,sumSelected)})
//.attr('fill', function(d) {return fillChoropleth(d,rdState,sumSelected)})
.attr('fill','gray')
.attr('stroke','#333').attr('stroke-width','.015')
.attr('d',geoPath)
.on('mouseover', function(d, i, sumSelected) {handleMouseover(d, i, sumSelected, saveState, this)})
Expand Down

0 comments on commit 5e00ec7

Please sign in to comment.