-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from ulvestad/comments
Improved comments
- Loading branch information
Showing
28 changed files
with
1,542 additions
and
447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,37 @@ | ||
//DISPLAYS IMAGE OF SELECTED POTENTIAL QUARRY | ||
//Static imagePath to the ScannedMaps folder | ||
var imagePath = "../scannedMaps/"; | ||
/* | ||
Filename: userInterface/js/displayImage.js | ||
@Author Group 13 | ||
Displays the image-file that is specified in the "imageName" parameter on ther result page | ||
Globals: | ||
imagePath - the path to the folder where the image-files are located | ||
emptyImagePath - the path to the empty white image used when no image is available | ||
*/ | ||
var imagePath = "../scannedMaps/"; // This file has to be located in the /scannedmaps folder, as specified in the "ImagePath" variable. | ||
var emptyImagePath = "../userInterface/icons/white.jpg" | ||
//Run this function when clicking on a marker/list item for a quarry. Insert correct imageName | ||
|
||
|
||
|
||
/* | ||
getCurrentImage | ||
Displays the image in /scannedmaps that has the provided filename. | ||
Inputs: | ||
- Image filename | ||
Outputs: | ||
- Displays the specified image on the result page | ||
Returns: None | ||
*/ | ||
function getCurrentImage(imageName){ | ||
fullImagePath = imagePath + imageName; | ||
if (imageName != ""){ | ||
document.getElementById('quarryImage').src=fullImagePath; | ||
document.getElementById('quarryImage').src=fullImagePath; //Displays the image | ||
}else{ | ||
document.getElementById('quarryImage').src = emptyImagePath; | ||
document.getElementById('quarryImage').src = emptyImagePath; //Displays an empty white image, used when no image should be displayed | ||
} | ||
|
||
} |
Oops, something went wrong.