Skip to content

Commit

Permalink
Minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
braxex committed Jan 24, 2018
1 parent 71147d6 commit e27882e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Tooltip } from 'react-tippy';
import Visualizer from './Visualizer.js';
import Legend from './Legend.js';
import Card from './Card.js';
import {flags} from './Flags.js';
import {flags} from './Flagfile.js';
import {LPRCheckbox, NICheckbox, Modal} from './Reusables.js';
import {lprStatics, niStatics, noteStatics} from './Statics.js';

Expand Down
2 changes: 1 addition & 1 deletion src/Card.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import React, { Component } from 'react';
import './Card.css';
import './Card.min.css';


class Card extends Component {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Legend.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import React, { Component } from 'react';
import './Legend.css';
import './legend.min.css';

let width = 30;

Expand Down
6 changes: 3 additions & 3 deletions src/Statics.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export let lprStatics = [
];

export let noteStatics = {
lprMsg: "Lawful permanent residents (LPRs, often referred to as “immigrants” or “green card holders”) are non-citizens who are lawfully authorized to live permanently in the US. LPRs may apply to become US citizens if they meet certain eligibility requirements. LPRs do not include foreign nationals granted temporary admission to the US, such as tourists and temporary workers (including H1B visa holders). Data organized by country of birth.<br/>3-year average: ≈1.08 million/year. <br/> <br/> For more information, visit <a href='https://goo.gl/dN78yY'>https://goo.gl/dN78yY</a>.",
niMsg: "Nonimmigrants (NIs) are foreign nationals granted temporary admission into the US for reasons including tourism and business trips, academic/vocational study, temporary employment, and to act as a representative of a foreign government or international organization. NIs are authorized to enter the country for specific purposes and defined periods of time, which are prescribed by their class of admission. Data organized by country of citizenship.<br/>3-year average: ≈76.1 million/year. <br/> <br/> For more information visit <a href='https://goo.gl/LJLYzc'>https://goo.gl/LJLYzc</a>.",
genMsg: "Data not shown for those with unknown country of birth/origin and for countries where total activity count was less than 10 people. <br/> dw = Data withheld to limit disclosures, per government sources. <br/><br/> Source code: <a href='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/braxtonex/immigration-visualizer'>github.com/braxtonex/immigration-visualizer</a>."
lprMsg: "Lawful permanent residents (LPRs, often referred to as “immigrants” or “green card holders”) are non-citizens who are lawfully authorized to live permanently in the US. LPRs may apply to become US citizens if they meet certain eligibility requirements. LPRs do not include foreign nationals granted temporary admission to the US, such as tourists and temporary workers (including H1B visa holders). Data organized by country of birth.<br/>3-year average: ≈1.08 million/year. <br/> <br/> For more information, visit <a href='https://goo.gl/dN78yY' target='_blank'>https://goo.gl/dN78yY</a>.",
niMsg: "Nonimmigrants (NIs) are foreign nationals granted temporary admission into the US for reasons including tourism and business trips, academic/vocational study, temporary employment, and to act as a representative of a foreign government or international organization. NIs are authorized to enter the country for specific purposes and defined periods of time, which are prescribed by their class of admission. Data organized by country of citizenship.<br/>3-year average: ≈76.1 million/year. <br/> <br/> For more information visit <a href='https://goo.gl/LJLYzc' target='_blank'>https://goo.gl/LJLYzc</a>.",
genMsg: "Data not shown for those with unknown country of birth/origin and for countries where total activity count was less than 10 people. <br/> dw = Data withheld to limit disclosures, per government sources. <br/><br/> Source code: <a href='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/braxtonex/immigration-visualizer' target='_blank'>github.com/braxtonex/immigration-visualizer</a>."
};
8 changes: 4 additions & 4 deletions src/Visualizer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import React, { Component } from 'react';
import './Visualizer.css';
import './Visualizer.min.css';
import * as d3 from 'd3';
import * as d3geoproj from 'd3-geo-projection';
import {lprScale, niScale} from './App.js';
Expand All @@ -22,8 +22,8 @@ class Visualizer extends Component {

setAndSaveMapBox() {
const d3Holder = document.getElementById('D3-holder');
const newMapWidth = d3Holder.offsetWidth -2;
const newMapHeight = d3Holder.offsetHeight -2;
const newMapWidth = d3Holder.offsetWidth -1;
const newMapHeight = d3Holder.offsetHeight -1;
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-2;
width = reactContainer.offsetWidth-1;
height = reactContainer.offsetHeight-2;

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

0 comments on commit e27882e

Please sign in to comment.