Unverified Commit 319c5430 authored by Scott Ames's avatar Scott Ames Committed by GitHub
Browse files

Merge pull request #62 from jkaufy/master

Added Lat wrapper, fixed radius finder, and removed target planet fr…
parents 70cedc3f 34632c47
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ export default class MapContainer extends Component {
    new Projection().addTo(map);
    new MousePosition({
      numDigits: 2,
      targetPlanet: this.props.target
    }).addTo(map);

    map.on("fullscreenchange", this.handleFullScreenChange());
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ export default class AstroMath {
      for(let i = 0; i < targets.length; i++) {
        let currentTarget = targets[i];

        if (currentTarget['name'].toLowerCase() == targetName ) {
        if (currentTarget['name'].toLowerCase() == this.targetName.toLowerCase()) {
          this.dMajorRadius = parseFloat(currentTarget['aaxisradius'] * 1000);
          this.dMinorRadius = parseFloat(currentTarget['caxisradius'] * 1000);
          break;
+2 −3
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ export default L.Control.MousePosition = L.Control.extend({
    separator: ", ",
    numDigits: 5,
    prefix: "",
    targetPlanet: "",
    lngFirst: true
  },

@@ -44,7 +43,7 @@ export default L.Control.MousePosition = L.Control.extend({
    this.isLatTypeOcentric = true;
    this.isLonDirEast = true;

    this.astroMath = new AstroMath(this.options.targetPlanet);
    this.astroMath = new AstroMath(map.target());
    this.coordDisplayElement = L.DomUtil.get("coordinateDisplay");
    this.coordDisplayElement.innerHTML = "lon, lat";

@@ -120,7 +119,7 @@ export default L.Control.MousePosition = L.Control.extend({
    let { lng } = e.latlng;
    let { lat } = e.latlng;

    lat = L.Util.wrapNum(lat, [-180.0, 180.0]);
    lat = L.Util.wrapNum(lat, [-90.0, 90.0]);
    lng = L.Util.wrapNum(lng, [-180.0, 180.0]);

    if (!this.isLatTypeOcentric) {