Unverified Commit 6ddbb2f9 authored by Kaitlyn Lee's avatar Kaitlyn Lee Committed by GitHub
Browse files

Merge pull request #74 from kaitlyndlee/docs2

Added Chris' changes to the documentation
parents 7f0254de 74ac749b
Loading
Loading
Loading
Loading

app/.jsdoc.json

0 → 100644
+27 −0
Original line number Diff line number Diff line
{
  "tags": {
    "allowUnknownTags": true,
    "dictionaries": ["jsdoc"]
  },
  "source": {
    "include": ["package.json", "README.md"],
    "includePattern": "./src/js/",
    "excludePattern": "(node_modules/|docs)"
  },
  "plugins": ["plugins/markdown"],
  "templates": {
    "referenceTitle": "CartoCosmos",
    "disableSort": false,
    "collapse": false,
    "resources": {
      "GitHub": "https://github.com/CartoCosmos/CartoCosmos"
    }
  },
  "opts": {
    "destination": "./docs/",
    "encoding": "utf8",
    "private": true,
    "recurse": true,
    "template": "node_modules/braintree-jsdoc-template/"
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
    "lint": "eslint --ext .js src",
    "fix": "npm run lint -- --fix",
    "prettier-watch": "onchange '**/*.js' -- prettier --write {{changed}}",
    "generate-docs": "node_modules/.bin/jsdoc src/js/ -d docs -t node_modules/braintree-jsdoc-template/"
    "generate-docs": "node_modules/.bin/jsdoc src/js/  --configure .jsdoc.json --verbose"
  },
  "devDependencies": {
    "@babel/core": "^7.8.3",
+2 −1
Original line number Diff line number Diff line
@@ -6,7 +6,8 @@ import "leaflet-fullscreen";
 * @aka L.Map.AstroMap
 * @extends L.Map
 *
 * @classdesc The central class that creates an interactive map in the HTML.
 * @classdesc 
 * The central class that creates an interactive map in the HTML.
 * Works with all target bodies supported by the USGS by loading the body's
 * base layers and overlays in a LayerCollection. Allows users to change
 * the projection of the map.

app/src/js/AstroMath.js

100755 → 100644
+0 −0

File mode changed from 100755 to 100644.

+8 −11
Original line number Diff line number Diff line
@@ -6,12 +6,12 @@ import Wkt from "wicket";
 * @class AstroDraw
 * @aka L.Control.AstroDraw
 * @extends L.Control
 * @classdesc
 * Class that extends from the class L.Control.Draw and handles the back-end when a user draws on the leaflet map.
 * Since this class inherits L.Control, it is added to the AstroMap in the same way as other controls, like the zoom control.
 *
 * * @example
 * @example
 *
 * ```js
 * // add a feature group to the map
 * let drawnItems = new L.FeatureGroup();
 * map.addLayer(drawnItems);
@@ -23,7 +23,6 @@ import Wkt from "wicket";
 * },
 *    targetMap: map
 * }).addTo(map);
 * ```
 */
export default L.Control.AstroDraw = L.Control.Draw.extend({
  options: {
@@ -33,8 +32,8 @@ export default L.Control.AstroDraw = L.Control.Draw.extend({
  },

  /**
   * Adds the draw control to the map provided. Creates an on-draw and on-click event
   * that allows users to draw polygons onto the leaflet map.
   * @function AstroDraw.prototype.onAdd
   * @description Adds the draw control to the map provided. Creates an on-draw and on-click event that allows users to draw polygons onto the leaflet map.
   * @param  {AstroMap} map - The AstroMap to add the control to.
   * @return {Object} The div-container the control is in.
   */
@@ -77,9 +76,8 @@ export default L.Control.AstroDraw = L.Control.Draw.extend({
  },

  /**
   * Is called when a user draws a shape using the on map drawing features.
   * Converts the shaped drawn into a Well-Known text string and inserts it into the
   * Well-Known text box.
   * @function AstroDraw.prototype.shapesToWKT
   * @description Is called when a user draws a shape using the on map drawing features. Converts the shaped drawn into a Well-Known text string and inserts it into the Well-Known text box.
   * @param  {DomEvent} e  - On draw.
   */
  shapesToWKT: function(e) {
@@ -95,9 +93,8 @@ export default L.Control.AstroDraw = L.Control.Draw.extend({
  },

  /**
   * Is called when a user clicks the draw button below the AstroMap.
   * Will take the Well-Known text string and draw the shape onto the map.
   * If the Well-Known text string is invalid an error will show in the text box.
   * @function AstroDraw.prototype.mapWKTString
   * @description  Is called when a user clicks the draw button below the AstroMap. Will take the Well-Known text string and draw the shape onto the map. If the Well-Known text string is invalid an error will show in the text box.
   * @param  {DomEvent} e  - On Click of Well-Known text button.
   */
  mapWKTString: function(e) {
Loading