From 6b10bcd5c52f221bd1baa0160f22473f069573a4 Mon Sep 17 00:00:00 2001
From: Haley Glavina <HaleyGlavina@Haleys-MacBook-Pro.local>
Date: Mon, 2 Apr 2018 17:47:15 -0400
Subject: [PATCH] Added comments to inforGenerator.js

---
 tomcat/webapps/Trawl/infoGenerator.js | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/tomcat/webapps/Trawl/infoGenerator.js b/tomcat/webapps/Trawl/infoGenerator.js
index 5cba6ef..450b8e8 100644
--- a/tomcat/webapps/Trawl/infoGenerator.js
+++ b/tomcat/webapps/Trawl/infoGenerator.js
@@ -1,16 +1,23 @@
+/**
+ * Generates html text to fill info windows on a Google Maps API
+ * @param names String array of scientific fish names
+ * @param dates Array of JSON objects containing 3 arrays: Year[], Month[], Day[]
+ * @param count Integer array of counts of each fish species
+ * @returns String array where each entry is html code to describe a marker on a map
+ */
 function infoGenerator(names, dates, count){
-	
-	
-	
+
 	var infoArray =[];
 	
 	for (int i=0; i < names.length; i++){
+		// Initialize variables to each data point's information
 		 var year = dates[i][0];
 		 var month = dates[i][1];
 		 var day = dates[i][2];
 		 var name = names[i];
 		 var count = count[i];
 
+		 // Generate string of html
 		 var contentString = ‘<div id=“content”>‘+
 		     ‘<div id=“siteNotice”>‘+
 		     ‘</div>‘+
@@ -26,7 +33,4 @@ function infoGenerator(names, dates, count){
 		    }
 	
 	return infoArray;
-	
-	
-	
 }
-- 
GitLab