Skip to content

Commit

Permalink
Minified js and added some loading text
Browse files Browse the repository at this point in the history
  • Loading branch information
dldx committed Mar 5, 2018
1 parent bfc9828 commit c9d50bb
Show file tree
Hide file tree
Showing 10 changed files with 155 additions and 92 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["env"]
"presets": ["env"],
}
65 changes: 54 additions & 11 deletions .tags

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion mps_over_time.es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,10 @@ function initial_render() {
zoom = d3.zoom().scaleExtent([0.95, 40]).on("zoom", zoomed);
// svg.call(zoom)
// canvas.call(zoom)


// Now show the scroll text
d3.select(".scroll__text").style("opacity", 1);
}

// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1740,7 +1744,7 @@ function fifth_slide() {
}

// Scales for this data
slide5_xScale = d3.scaleLinear().domain([-300, 150]).range([0, width]);
slide5_xScale = d3.scaleLinear().domain([-350, 150]).range([0, width]);

slide5_yScale = d3.scaleLinear().domain([-0.005, 0.3]).range([height, 0]);

Expand Down Expand Up @@ -2504,6 +2508,8 @@ function download_data() {
d.lib_snp_women_pct = d.lib_snp_women_mps / d.lib_snp_mps * 100;
});
window.info_bubbles_data = info_bubbles;
// Hide loading text
d3.select("#loading").remove();
// INITIAL DRAW
draw_graph();
});
Expand Down
154 changes: 80 additions & 74 deletions mps_over_time.html

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion mps_over_time.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,10 @@ function initial_render() {
// svg.call(zoom)
// canvas.call(zoom)


// Now show the scroll text
d3.select(".scroll__text").style("opacity", 1)

}

// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -2437,7 +2441,7 @@ function fifth_slide(no_transition = false) {

// Scales for this data
slide5_xScale = d3.scaleLinear()
.domain([-300, 150])
.domain([-350, 150])
.range([0, width])

slide5_yScale = d3.scaleLinear()
Expand Down Expand Up @@ -3458,6 +3462,8 @@ function download_data() {
d.lib_snp_women_pct = d.lib_snp_women_mps / d.lib_snp_mps * 100
})
window.info_bubbles_data = info_bubbles
// Hide loading text
d3.select("#loading").remove()
// INITIAL DRAW
draw_graph()
})
Expand Down
2 changes: 1 addition & 1 deletion mps_over_time.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-uglify": "^1.0.2",
"babel-preset-env": "^1.6.1",
"rollup-plugin-commonjs": "^8.2.6",
"rollup-plugin-node-resolve": "^3.0.2"
Expand Down
2 changes: 1 addition & 1 deletion style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion style.min.css.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ body {
position: relative;
padding-left: 120px;
max-width: 30rem;
transition: 1s opacity ease-in-out;
@include phone {
padding-left: 30px;
}
Expand Down Expand Up @@ -458,7 +459,7 @@ $nav-button-fg: lighten(map-get($colors, Hover), 50);
}

#timeline {
border-radius: 1px;
// border-radius: 1px;
// bottom: 0;
left: 0;
// margin: 10px;
Expand Down

0 comments on commit c9d50bb

Please sign in to comment.