Skip to content

Commit

Permalink
added lat/long display in diversity window to address #101
Browse files Browse the repository at this point in the history
  • Loading branch information
vjpsyverson committed May 16, 2018
1 parent 4b78851 commit 3399d91
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion assets/js/diversity.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ var diversityPlot = (function() {
var extinction = $('[name="extant"]').is(":checked");
};


// Define a scale for the x axis
var x = d3.scale.linear()
.domain([d3.max(eras, function(d) { return d.eag; }), d3.min(eras, function(d) { return d.lag; }) - 1])
Expand Down
2 changes: 2 additions & 0 deletions assets/js/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ var paleo_nav = (function() {

var diversityURL = navMap.parseURL(testUrl + dataService + "/occs/quickdiv.json?lngmin=" + sw.lng.toFixed(1) + "&lngmax=" + ne.lng.toFixed(1) + "&latmin=" + sw.lat.toFixed(1) + "&latmax=" + ne.lat.toFixed(1) + "&count=genera&reso=stage");
$(".diversityDownload").attr("href", diversityURL);
// console.log(sw.lng.toFixed(1) + "° to " + ne.lng.toFixed(1) + "° N, " + sw.lat.toFixed(1) + "° to " + ne.lat.toFixed(1) + "° E");
$("#divMapBounds").html(sw.lng.toFixed(1) + "° to " + ne.lng.toFixed(1) + "° N, " + sw.lat.toFixed(1) + "° to " + ne.lat.toFixed(1) + "° E");
diversityPlot.plot(diversityURL,false);

});
Expand Down
6 changes: 3 additions & 3 deletions build/js/script.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ <h5 id="interval"></h5>
<div id="diversity"></div>
</div>
<div class="row col-sm-3 diversityControls">
<div class="col-sm-12 diversityControl">
<p>Map bounds:</p>
<p><strong id="divMapBounds">-180 to 180 N, -90 to 90 E</strong></p>
</div>
<div class="col-sm-12 diversityControl">
<p>Change taxonomic level</p>
<select name="taxonLevel" onchange="diversityPlot.updateQuickdiv()">
Expand Down

0 comments on commit 3399d91

Please sign in to comment.