Skip to content

Commit

Permalink
Merge pull request #59 from Jollyfant/dev
Browse files Browse the repository at this point in the history
Version 2.0.1
  • Loading branch information
Jollyfant authored Feb 25, 2020
2 parents 1618a3c + 24aad39 commit 9d06570
Show file tree
Hide file tree
Showing 20 changed files with 772 additions and 122 deletions.
43 changes: 42 additions & 1 deletion changelog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,47 @@ <h5> Paleomagnetism.org 2 - Changelog </h5>
</div>

<div id="accordion">

<div class="card">
<div class="card-header" id="headingTwo">
<button class="btn btn-link" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
Paleomagnetism.org 2.1.0 - Release <small class="text-muted">&nbsp; 2020-02-25</small>
</button>
</div>
<div id="collapseTwo" class="collapse show" aria-labelledby="headingTwo" data-parent="#accordion">
<div class="card-body">
<b> Change Summary </b>
<p> Some new features were added for user convenience. Minor bugs were fixed.
<ul>
<p> <b> Features </b>
<li> Added window to add some metadata to collections in the statistics portal. This can be used when exporting .pub files for sharing for literature data that cannot be submitted to the data library.
<li> Added satellite imagery to the geography portal (#53).
</ul>
<ul>
<p> <b> Fixes </b>
<li> Added new paper (Koymans et al., 2020) to the references page.
<li> Fixed JSON exporting in statistics portal mean directions tab.
<li> Fixed reading of input files in reversed order. The order is now as expected.
<li> Intensity plot in the interpretation portal now uses categories instead of numeric values.
<li> Size of charts in the interpretation portal has been increased.
<li> The PalPole description on the miscellaneous portal has been updated.
<li> A warning is now shown when the application is run in to beta mode.
<li> Map width in the geography portal has been reduced and bounds were removed (#51, #52).
<li> Fixed GPlates rotation files for plate ID "0" which is the same as "000" (#54)
<li> Fixed accidental swap of latitude, longitude in publication preview map.
<li> Fixed CTMD test not working for reversed directions.
<li> Added Remasoft (RS3) file format.
<li> Data library author information is now taken from DOI by default.
<li> Added age and generated country based on lat, lng to data library.
<li> Prevent linking to statistics/geography portal when no interpreted components are available.
</ul>

</div>
</div>
</div>

<p>

<div class="card">
<div class="card-header" id="headingOne">
<button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Expand All @@ -85,7 +126,7 @@ <h5> Paleomagnetism.org 2 - Changelog </h5>
</div>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<b> Change Summary <20>
<b> Change Summary </b>
<p> The release of Paleomagnetism 2.0.0 exists in parallel with the <a href="http://old.paleomagnetism.org">old application</a>. The old version may have some additional features in the statistics portal that were removed in this version. This version of Paleomagnetism.org focuses on raw demagnetization data and its provenance, and may therefore be more limited in what it allows.
<ul>
<p> <b> Features </b>
Expand Down
2 changes: 0 additions & 2 deletions collection/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ function addMap(specimens) {
var mapOptions = {
"minZoom": 1,
"maxZoom": 13,
"maxBounds": new L.latLngBounds(new L.latLng(-90, -180), new L.latLng(90, 180)),
"maxBoundsViscosity": 0.5,
"attributionControl": true
}

Expand Down
3 changes: 3 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ p {

#wrapper {
position: relative;
width: 80%;
margin: auto;
}

.popover {
min-width: 25%;
}
Expand Down
16 changes: 13 additions & 3 deletions geography/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,24 @@ <h5 class="mb-0">
</h5>
</div>
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body" style='text-align: left;'>
<div class="form-check text-center">
<div class="card-body" style='text-align: center;'>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" value="" id="defaultCheck1" checked>
<label class="form-check-label" for="defaultCheck1">
Enable grid
Grid
</label>
</div>

<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" value="" id="enable-satellite">
<label class="form-check-label" for="enable-satellite">
Satellite
</label>
</div>

<br>
<br>

<div class="form-group">
<div class="row">
<div class="col">
Expand Down
4 changes: 2 additions & 2 deletions geography/js/gplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ function readGPlatesRotation(ID, age) {
}

// Continue when we are referencing the fixed plate ID
while(ID !== "000") {
while(parseInt(ID) !== 0) {

var plateData = GPlatesData[ID];

// Search input for matching plateID & age
for(var i = 0; i < plateData.length; i++) {
for(var i = 1; i < plateData.length; i++) {

if(plateData[i].age < age) {

Expand Down
29 changes: 22 additions & 7 deletions geography/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@ function addMap() {
*/

const MAP_CONTAINER = "map";
const TILE_LAYER = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
const TILE_LAYER_DEFAULT = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
const TILE_LAYER_ARCGIS = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}";
const VIEWPORT = new L.latLng(35, 0);

// Set map options (bounds)
var mapOptions = {
"minZoom": 2,
"maxBounds": new L.latLngBounds(new L.latLng(-90, -180), new L.latLng(90, 180)),
"maxBoundsViscosity": 0.5,
"attributionControl": true
}

// Create the map and tile layer
map = L.map(MAP_CONTAINER, mapOptions).setView(VIEWPORT, 1);
L.tileLayer(TILE_LAYER).addTo(map);

window.defaultLayer = L.tileLayer(TILE_LAYER_DEFAULT);
window.arcgisLayer = L.tileLayer(TILE_LAYER_ARCGIS);
toggleSatelliteLayer();

// Reload the map when the tab is focussed on
$("#nav-apwp-tab").on("shown.bs.tab", map.invalidateSize.bind(map));
Expand Down Expand Up @@ -65,10 +67,10 @@ function createGridLayer(map) {
*/

return L.latlngGraticule({
"opacity": 0.5,
"opacity": 1,
"color": HIGHCHARTS_WHITE,
"fontColor": HIGHCHARTS_BLACK,
"font": "12px Helvetica",
"fontColor": HIGHCHARTS_WHITE,
"font": "12px Sans-Serif",
"showLabel": true,
"zoomInterval": [
{"start": 2, "end": 3, "interval": 30},
Expand All @@ -81,6 +83,18 @@ function createGridLayer(map) {

}

function toggleSatelliteLayer() {

if(document.getElementById("enable-satellite").checked) {
map.removeLayer(window.defaultLayer);
map.addLayer(window.arcgisLayer);
} else {
map.removeLayer(window.arcgisLayer);
map.addLayer(window.defaultLayer);
}

}

function toggleGridLayer() {

/*
Expand Down Expand Up @@ -244,6 +258,7 @@ function registerEventHandlers() {
document.getElementById("cutoff-selection").addEventListener("change", redrawCharts);
document.addEventListener("keydown", keyboardHandler);
document.getElementById("defaultCheck1").addEventListener("change", toggleGridLayer);
document.getElementById("enable-satellite").addEventListener("change", toggleSatelliteLayer);
document.getElementById("calculate-reference").addEventListener("click", plotPredictedDirections);

document.getElementById("defer-input").addEventListener("click", inputFileWrapper);
Expand Down
7 changes: 4 additions & 3 deletions interpretation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ <h5> Paleomagnetism.org 2 - Interpretation </h5>
<option value="CJONES">PaleoMag (orientation error: don't use)</option>
<option value="PALEOMAC">PaleoMac</option>
<option value="BCN2G">BCN2G</option>
<option value="RS3">Remasoft</option>
<option value="JR5">JR5 (experimental)</option>
<option value="JR6">JR6 (experimental)</option>
</optgroup>
Expand Down Expand Up @@ -190,7 +191,7 @@ <h5> Paleomagnetism.org 2 - Interpretation </h5>
<div class="row">

<!-- Step Controller -->
<div class="col-md-2">
<div class="col-md-12 col-lg-2">

<!-- Demagnetization Type Selector -->
<div style="border: 1px solid lightgrey;" class="btn-group d-flex btn-group-toggle" data-toggle="buttons">
Expand All @@ -215,10 +216,10 @@ <h5> Paleomagnetism.org 2 - Interpretation </h5>
</div>

<!-- Zijderveld & Equal Area Plot -->
<div class="col-md-5">
<div class="col-md-12 col-lg-5">
<div id="zijderveld-container"></div>
</div>
<div class="col-md-5">
<div class="col-md-12 col-lg-5">
<div id="hemisphere-container"></div>
</div>

Expand Down
14 changes: 9 additions & 5 deletions interpretation/js/graphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function plotIntensityDiagram(hover) {
var specimen = getSelectedSpecimen();

var intensities = new Array();
var categories = new Array();
var hoverIndex = null;

specimen.steps.forEach(function(step, i) {
Expand All @@ -122,11 +123,11 @@ function plotIntensityDiagram(hover) {
hoverIndex = intensities.length;
}

// Get the treatment step as a number
var treatmentStep = extractNumbers(step.step);
// Use categories to stop mixing AF / TH
categories.push(step.step)

intensities.push({
"x": treatmentStep,
"x": i,
"y": new Coordinates(step.x, step.y, step.z).length,
"stepIndex": i
});
Expand Down Expand Up @@ -217,7 +218,7 @@ function plotIntensityDiagram(hover) {
"zIndex": 0
});

createIntensityDiagram(hover, plotSeries);
createIntensityDiagram(hover, plotSeries, categories);

}

Expand Down Expand Up @@ -447,6 +448,7 @@ function plotZijderveldDiagram(hover) {
"chart": {
"animation": false,
"id": "zijderveld-container",
"height": 500,
"zoomType": "xy",
"events": {
"load": resetMarkerSize
Expand Down Expand Up @@ -833,7 +835,7 @@ function resetMarkerSize() {

}

function createIntensityDiagram(hover, series) {
function createIntensityDiagram(hover, series, categories) {

/*
* Function createIntensityDiagram
Expand Down Expand Up @@ -894,6 +896,7 @@ function createIntensityDiagram(hover, series) {
"formatter": intensityTooltip
},
"xAxis": {
"categories": categories,
"title": {
"text": "Demagnetization steps"
}
Expand Down Expand Up @@ -1099,6 +1102,7 @@ function eqAreaProjection(hover) {
Highcharts.chart(CHART_CONTAINER, {
"chart": {
"polar": true,
"height": 500,
"events": {
"load": resetMarkerSize
},
Expand Down
Loading

0 comments on commit 9d06570

Please sign in to comment.