Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2XB3FinalProject
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Schankula
2XB3FinalProject
Commits
f599903a
Commit
f599903a
authored
7 years ago
by
Lawrence Chung
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://gitlab.cas.mcmaster.ca/schankuc/2XB3
parents
770fb026
9865c086
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tomcat/webapps/Trawl/cluster.js
+1
-1
1 addition, 1 deletion
tomcat/webapps/Trawl/cluster.js
tomcat/webapps/Trawl/infoWindow.js
+1
-1
1 addition, 1 deletion
tomcat/webapps/Trawl/infoWindow.js
tomcat/webapps/Trawl/script.js
+17
-7
17 additions, 7 deletions
tomcat/webapps/Trawl/script.js
with
19 additions
and
9 deletions
tomcat/webapps/Trawl/cluster.js
+
1
−
1
View file @
f599903a
...
...
@@ -3,7 +3,7 @@
// Displays markers on a map centred at the Laurentian Great Lakes
// When the user clicks the marker, an info window opens
var
openCWindow
;
var
openCWindow
;
// Keeps track of the current opened infowindow
function
initCluster
(
lati
,
longi
,
n
,
individualCount
)
{
// Generate map centred at Great Lakes
...
...
This diff is collapsed.
Click to expand it.
tomcat/webapps/Trawl/infoWindow.js
+
1
−
1
View file @
f599903a
...
...
@@ -3,7 +3,7 @@
// Displays markers on a map centred at the Laurentian Great Lakes
// When the user clicks the marker, an info window opens
var
openWindow
;
var
openWindow
;
// Keeps track of the current opened infowindow
function
initInfo
(
lati
,
longi
,
name
,
date
,
individualCount
)
{
// Generate map centred at Great Lakes
...
...
This diff is collapsed.
Click to expand it.
tomcat/webapps/Trawl/script.js
+
17
−
7
View file @
f599903a
...
...
@@ -19,6 +19,8 @@ function resolveAny(obj) {
}
}
// Updates the dropdown menus
// Called whenever a dropdown menu changes and on init
function
callUpdateSci
(
object
){
var
tagID
=
object
.
id
;
var
taxID
=
Number
(
object
.
value
);
...
...
@@ -32,9 +34,10 @@ function callUpdateSci(object){
reqBioLookup
(
tagID
,
taxID
);
}
// Populates a menu's innerHTML with options
function
populateDropdown
(
childTagID
,
nodeList
,
subnode
){
var
x
,
y
,
content
=
""
;
console
.
log
(
nodeList
[
subnode
]);
//
console.log(nodeList[subnode]);
if
(
nodeList
[
subnode
]
!=
null
){
for
(
var
i
in
nodeList
[
subnode
][
"
taxonName
"
]){
x
=
nodeList
[
subnode
][
"
taxonId
"
][
i
];
...
...
@@ -42,13 +45,10 @@ function populateDropdown(childTagID, nodeList, subnode){
content
+=
'
"<option value="
'
+
x
+
'
">
'
+
y
+
'
</option>
'
;
}
}
// else {
// content
// }
document
.
getElementById
(
childTagID
).
innerHTML
=
content
;
}
// Calls populate dropdown for all menus based off what has changed.
function
updateSci
(
tagID
,
nodeList
)
{
while
(
tagID
!==
"
END
"
){
switch
(
tagID
){
...
...
@@ -184,7 +184,7 @@ function getTaxGroup() {
}
}
// Requests info window map from the server
function
reqMap
(
params
){
var
path
=
'
doMap.do
'
;
var
xhr
=
new
XMLHttpRequest
();
...
...
@@ -205,6 +205,7 @@ function reqMap(params){
xhr
.
send
(
params
);
//send request to server
}
// Requests heatmap from the server
function
reqHeat
(
params
){
var
path
=
'
doMap.do
'
;
var
xhr
=
new
XMLHttpRequest
();
...
...
@@ -224,6 +225,7 @@ xhr.onreadystatechange = function() {//Call a function when the state changes (i
xhr
.
send
(
params
);
//send request to server
}
// Requests cluster map from the server
function
reqCluster
(
params
){
var
path
=
'
doCluster.do
'
;
var
xhr
=
new
XMLHttpRequest
();
...
...
@@ -243,6 +245,7 @@ function reqCluster(params){
xhr
.
send
(
params
);
//send request to server
}
// Requests list of individual results from the server
function
reqResults
(
params
,
lo
,
hi
){
var
path
=
'
doList.do
'
;
var
xhr
=
new
XMLHttpRequest
();
...
...
@@ -266,6 +269,10 @@ function reqResults(params, lo, hi){
xhr
.
send
(
params
);
//send request to server
}
// Finds which output option is selected
// Creates JSON object from input form values
// Clears current innerHTML of output elements
// Calls the appropriate server request function
function
callOutput
(){
var
pickOutputType
=
document
.
getElementsByName
(
'
pickOutput
'
);
var
outType
,
taxGroup
,
yearFrom
,
yearTo
,
clusterSize
;
...
...
@@ -287,6 +294,7 @@ function callOutput(){
document
.
getElementById
(
"
outputBox
"
).
innerHTML
=
""
;
document
.
getElementById
(
"
outputDetails
"
).
innerHTML
=
""
;
// Find the type of output selected and call the respective function
if
(
outType
===
"
histogram
"
){
document
.
getElementById
(
"
outputBox
"
).
innerHTML
=
'
<div id="histogram"></div>
'
;
reqHistogram
(
params
);
...
...
@@ -309,7 +317,8 @@ function callOutput(){
}
}
// JQuery for Range Slider
// JQuery Range Slider
// Used for year range input
$
(
function
()
{
$
(
"
#slider-range
"
).
slider
({
range
:
true
,
...
...
@@ -323,4 +332,5 @@ $( function() {
$
(
"
#fromtoYear
"
).
html
(
$
(
"
#slider-range
"
).
slider
(
"
values
"
,
0
)
+
"
-
"
+
$
(
"
#slider-range
"
).
slider
(
"
values
"
,
1
))
}
);
// When the window initializes, call init().
window
.
onload
=
init
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment