Commit 6a53c71d authored by Piotr Gawron's avatar Piotr Gawron
Browse files

fixing spelling typos

parent a61001cf
This diff is collapsed.
......@@ -23,17 +23,17 @@ function Configuration(json) {
}
var legendFiles = [];
if (self.getOption("LENGEND_FILE_1") !== undefined) {
legendFiles.push(self.getOption("LENGEND_FILE_1"));
if (self.getOption("LEGEND_FILE_1") !== undefined) {
legendFiles.push(self.getOption("LEGEND_FILE_1"));
}
if (self.getOption("LENGEND_FILE_2") !== undefined) {
legendFiles.push(self.getOption("LENGEND_FILE_2"));
if (self.getOption("LEGEND_FILE_2") !== undefined) {
legendFiles.push(self.getOption("LEGEND_FILE_2"));
}
if (self.getOption("LENGEND_FILE_3") !== undefined) {
legendFiles.push(self.getOption("LENGEND_FILE_3"));
if (self.getOption("LEGEND_FILE_3") !== undefined) {
legendFiles.push(self.getOption("LEGEND_FILE_3"));
}
if (self.getOption("LENGEND_FILE_4") !== undefined) {
legendFiles.push(self.getOption("LENGEND_FILE_4"));
if (self.getOption("LEGEND_FILE_4") !== undefined) {
legendFiles.push(self.getOption("LEGEND_FILE_4"));
}
self.setOption(ConfigurationType.LEGEND_FILES, legendFiles);
......
......@@ -32,8 +32,8 @@ Functions.radiansToDegrees = function(rad) {
Functions.intToColorString = function(value) {
/* jslint bitwise: true */
var timmedValue = (value & 0xFFFFFF);
var colorStr = timmedValue.toString(16);
var trimmedValue = (value & 0xFFFFFF);
var colorStr = trimmedValue.toString(16);
while (colorStr.length < 6) {
colorStr = "0" + colorStr;
}
......@@ -103,8 +103,8 @@ Functions.pointInsidePolygon = function(point, polygon) {
};
/**
* In a browser variable we store inforamtion about browser user is currently
* using. Right now only IE is suppoerted.
* In a browser variable we store information about browser user is currently
* using. Right now only IE is supported.
*/
Functions.browser = {
init : function() {
......
......@@ -16,6 +16,8 @@ function GuiConnector() {
this.xPos = 0;
// coordinate of the mouse in a browser.
this.yPos = 0;
this.getParams = [];
}
function returnThisOrSingleton(object) {
......@@ -42,7 +44,7 @@ GuiConnector.prototype.init = function () {
var isIE = /* @cc_on!@ */false || !!document.documentMode;
if (isIE) {
alert("This webpage works well with Chrome, Firefox and Safari.");
alert("This web page works well with Chrome, Firefox and Safari.");
}
// bootstrap tab initialization
$("ul.nav-tabs a").click(function (e) {
......
......@@ -19,7 +19,7 @@ function ObjectWithListeners() {
* @param type
* string defining type of the listener
* @param fun
* function that should be thrown when type event occures
* function that should be thrown when type event occurs
*/
ObjectWithListeners.prototype.addListener = function(type, fun) {
if (this._validListeners[type] === undefined) {
......@@ -58,7 +58,7 @@ ObjectWithListeners.prototype.addPropertyChangeListener = function(name, fun) {
* Register new type of listener.
*
* @param type
* string identifing new type of listener
* string identifying new type of listener
*/
ObjectWithListeners.prototype.registerListenerType = function(type) {
if (this._validListeners[type] !== undefined) {
......@@ -71,7 +71,7 @@ ObjectWithListeners.prototype.registerListenerType = function(type) {
* Register new property for listening.
*
* @param name
* string identifing proeprty
* string identifying property
*/
ObjectWithListeners.prototype.registerPropertyType = function(name) {
if (this._validPropertyListeners[name] !== undefined) {
......@@ -86,7 +86,7 @@ ObjectWithListeners.prototype.registerPropertyType = function(name) {
* @param type
* type of the listener
* @param fun
* function that was call when event occred that should be removed
* function that was call when event occurred that should be removed
*/
ObjectWithListeners.prototype.removeListener = function(type, fun) {
if (this._validListeners[type] === undefined) {
......@@ -113,7 +113,7 @@ ObjectWithListeners.prototype.removeListener = function(type, fun) {
* @param name
* name of the property
* @param fun
* function that was call when event occred that should be removed
* function that was call when event occurred that should be removed
*/
ObjectWithListeners.prototype.removePropertyListener = function(name, fun) {
if (this._validPropertyListeners[name] === undefined) {
......@@ -171,12 +171,12 @@ ObjectWithListeners.prototype.getListeners = function(type) {
*
* @param propertyName
* name of the property
* @param oldval
* @param oldValue
* old value of the property
* @param newval
* @param newValue
* new value of the property
*/
ObjectWithListeners.prototype.firePropertyChangeListener = function(propertyName, oldval, newval) {
ObjectWithListeners.prototype.firePropertyChangeListener = function(propertyName, oldValue, newValue) {
var self = this;
if (this._validPropertyListeners[propertyName] === undefined) {
throw new Error("Unknown property type: " + propertyName);
......@@ -188,8 +188,8 @@ ObjectWithListeners.prototype.firePropertyChangeListener = function(propertyName
var e = {
propertyName : propertyName,
object : self,
oldVal : oldval,
newVal : newval,
oldVal : oldValue,
newVal : newValue,
};
promises.push(listenerList[i](e));
}
......
......@@ -59,10 +59,10 @@ AbstractGuiElement.prototype.getProject = function() {
AbstractGuiElement.prototype.setControlElement = function(type, element) {
if (type === null || type === undefined) {
throw new Error("Unknown controle element type");
throw new Error("Unknown control element type");
}
if (PanelControlElementType[type] === undefined) {
throw new Error("Unknown controle element type: " + type);
throw new Error("Unknown control element type: " + type);
}
this._controlElements[type] = element;
......@@ -70,10 +70,10 @@ AbstractGuiElement.prototype.setControlElement = function(type, element) {
AbstractGuiElement.prototype.getControlElement = function(type) {
if (type === null || type === undefined) {
throw new Error("Unknown controle element type");
throw new Error("Unknown control element type");
}
if (PanelControlElementType[type] === undefined) {
throw new Error("Unknown controle element type: " + type);
throw new Error("Unknown control element type: " + type);
}
return this._controlElements[type];
......
......@@ -34,7 +34,7 @@ Legend.prototype._initializeGui = function() {
className : "carousel-indicators",
});
legendDiv.appendChild(indicators);
self.setControlElement(PanelControlElementType.LEGEND_INDICATIORS_OL, indicators);
self.setControlElement(PanelControlElementType.LEGEND_INDICATORS_OL, indicators);
var slidesDiv = Functions.createElement({
type : "div",
......@@ -101,7 +101,7 @@ function createLegendSlide(file, index) {
Legend.prototype.init = function() {
var self = this;
var element = self.getElement();
var menu = self.getControlElement(PanelControlElementType.LEGEND_INDICATIORS_OL);
var menu = self.getControlElement(PanelControlElementType.LEGEND_INDICATORS_OL);
var slides = self.getControlElement(PanelControlElementType.LEGEND_SLIDES_DIV);
return ServerConnector.getConfigurationParam(ConfigurationType.LEGEND_FILES).then(function(legendFiles) {
for (var i = 0; i < legendFiles.length; i++) {
......
......@@ -18,7 +18,7 @@ function LoginDialog(params) {
var loginButton = self.getControlElement(PanelControlElementType.USER_TAB_LOGIN_BUTTON);
loginButton.onclick = function () {
var login = self.getControlElement(PanelControlElementType.USER_TAB_LOGIN_INPUT_TEXT).value;
var password = self.getControlElement(PanelControlElementType.USER_TAB_PASSOWRD_INPUT_TEXT).value;
var password = self.getControlElement(PanelControlElementType.USER_TAB_PASSWORD_INPUT_TEXT).value;
return ServerConnector.login(login, password).then(function () {
window.location.reload(false);
......@@ -86,7 +86,7 @@ LoginDialog.prototype._createLoginTab = function () {
style: "width:100%",
name: "passwordText"
});
this.setControlElement(PanelControlElementType.USER_TAB_PASSOWRD_INPUT_TEXT, passwordInput);
this.setControlElement(PanelControlElementType.USER_TAB_PASSWORD_INPUT_TEXT, passwordInput);
authorizationFormTab.appendChild(self.createTableRow([passwordLabel, passwordInput]));
......
......@@ -72,7 +72,7 @@ OverviewDialog.prototype.showOverview = function(overviewImageId) {
var ratio = 1.0;
// check how image should be resized to fit dialog and resize it manually!!!
// check how image should be re-sized to fit dialog and resize it manually!!!
if (width / this.overviewImage.width > height / this.overviewImage.height) {
this.overviewImageTag.style.height = height + "px";
ratio = height / this.overviewImage.height;
......@@ -86,7 +86,7 @@ OverviewDialog.prototype.showOverview = function(overviewImageId) {
}
// on click event (what should happen when we click on the image)
var onclickevent = function getClickPosition(e) {
var onClickEvent = function getClickPosition(e) {
var parentPosition = functions.getPosition(e.currentTarget);
var xPosition = e.clientX - parentPosition.x;
var yPosition = e.clientY - parentPosition.y;
......@@ -117,16 +117,16 @@ OverviewDialog.prototype.showOverview = function(overviewImageId) {
}
};
this.overviewImageTag.onclick = onclickevent;
this.overviewImageTag.onclick = onClickEvent;
// resize canvas where on mouse over highligh will appear
// resize canvas where on mouse over highlight will appear
// in debug mode draw clickable shapes
if (map.isDebug()) {
canvasDebug.style.display = "";
canvasDebug.width = width;
canvasDebug.height = height;
canvasDebug.onclick = onclickevent;
canvasDebug.onclick = onClickEvent;
this.drawClickableShapes(canvasDebug, ratio);
}
......@@ -136,9 +136,9 @@ OverviewDialog.prototype.showOverview = function(overviewImageId) {
};
// this listener should be called when mouse moves over image, it purpose is
// to change coursor to pointer when mouse enters clickable polygon and back
// to change cursor to pointer when mouse enters clickable polygon and back
// to normal when mouse leaves such region
var onmousemove = function getMouseOverPosition(e) {
var onMouseMove = function getMouseOverPosition(e) {
var position = functions.getPosition(e.currentTarget);
position.x = e.clientX - position.x;
position.y = e.clientY - position.y;
......@@ -170,11 +170,11 @@ OverviewDialog.prototype.showOverview = function(overviewImageId) {
}
};
// onmousemove listener should be assigned to canvas (which is on top of the
// image) and overviewimage (just in case something went wrong with resizing
// onMouseMove listener should be assigned to canvas (which is on top of the
// image) and overviewImage (just in case something went wrong with resizing
// canvas)
canvasDebug.onmousemove = onmousemove;
this.overviewImageTag.onmousemove = onmousemove;
canvasDebug.onmousemove = onMouseMove;
this.overviewImageTag.onmousemove = onMouseMove;
$(self.getElement()).dialog("open");
};
......
......@@ -99,7 +99,7 @@ Panel.prototype.disablePanel = function (message) {
self.getElement().insertBefore(hideReasonDiv, searchQueryElement);
};
Panel.prototype.isDisbaled = function () {
Panel.prototype.isDisabled = function () {
var self = this;
var searchQueryElement = self.getControlElement(PanelControlElementType.SEARCH_DIV);
return searchQueryElement.style.visibility === "hidden";
......
......@@ -20,7 +20,7 @@ var PanelControlElementType = {
USER_TAB_LOGIN_DIV : "USER_TAB_LOGIN_DIV",
USER_TAB_LOGIN_INPUT_TEXT : "USER_TAB_LOGIN_INPUT_TEXT",
USER_TAB_PASSOWRD_INPUT_TEXT : "USER_TAB_PASSOWRD_INPUT_TEXT",
USER_TAB_PASSWORD_INPUT_TEXT : "USER_TAB_PASSWORD_INPUT_TEXT",
USER_TAB_LOGIN_BUTTON : "USER_TAB_LOGIN_BUTTON",
USER_TAB_USER_DIV : "USER_TAB_USER_DIV",
......@@ -36,12 +36,12 @@ var PanelControlElementType = {
INFO_DIV : "INFO_DIV",
INFO_PROJECT_NAME_TEXT : "INFO_PROJECT_NAME_TEXT",
INFO_PROJECT_VERSION_TEXT : "INFO_PROJECT_VERSION_TEXT",
INFO_PROJECT_DESCRIOPTION_TEXT : "INFO_PROJECT_DESCRIOPTION_TEXT",
INFO_PROJECT_DESCRIPTION_TEXT : "INFO_PROJECT_DESCRIPTION_TEXT",
INFO_PROJECT_PUBLICATIONS_TEXT : "INFO_PROJECT_PUBLICATIONS_TEXT",
INFO_PROJECT_SHOW_PUBLICATIONS_BUTTON : "INFO_PROJECT_SHOW_PUBLICATIONS_BUTTON",
INFO_PROJECT_GET_ORIGINAL_FILE_BUTTON : "INFO_PROJECT_GET_ORIGINAL_FILE_BUTTON",
LEGEND_INDICATIORS_OL : "LEGEND_INDICATIORS_OL",
LEGEND_INDICATORS_OL : "LEGEND_INDICATORS_OL",
LEGEND_SLIDES_DIV : "LEGEND_SLIDES_DIV",
MENU_LEGEND_CHECKBOX : "MENU_LEGEND_CHECKBOX",
......
......@@ -193,7 +193,7 @@ AbstractPanel.prototype.getAutocomplete = function() {
};
AbstractPanel.prototype.searchByQuery = function() {
throw new Error("searchByQuery is not implemnted");
throw new Error("searchByQuery is not implemented");
};
AbstractPanel.prototype.addResultTab = function(query, elements) {
......
......@@ -39,7 +39,7 @@ ChemicalPanel.prototype.createPreamble = function (chemical) {
result.appendChild(guiUtils.createArrayParamLine("Synonyms: ", chemical.getSynonyms()));
result.appendChild(guiUtils.createParamLine("Direct Evidence: ", chemical.getDirectEvidence()));
result.appendChild(guiUtils
.createAnnotations("Directe Evidence Publications: ", chemical.getDirectEvidenceReferences()));
.createAnnotations("Direct Evidence Publications: ", chemical.getDirectEvidenceReferences()));
result.appendChild(guiUtils.createAnnotations("Sources: ", chemical.getReferences()));
result.appendChild(guiUtils.createNewLine());
}
......
......@@ -367,7 +367,7 @@ GuiUtils.prototype.createAliasElement = function(params) {
div.appendChild(self.createParamLine("Abbreviation: ", alias.getAbbreviation()));
div.appendChild(self.createParamLine("Formula: ", alias.getFormula()));
div.appendChild(self.createArrayParamLine("Former symbols: ", alias.getFormerSymbols()));
div.appendChild(self.createPostTranslationalModifications("Posttranslational modifications: ", alias
div.appendChild(self.createPostTranslationalModifications("PostTranslational modifications: ", alias
.getOther('modifications')));
div.appendChild(self.createParamLine("Charge: ", alias.getCharge()));
div.appendChild(self.createArrayParamLine("Synonyms: ", alias.getSynonyms()));
......
......@@ -115,9 +115,9 @@ LeftPanel.prototype.getPanelsDefinition = function () {
LeftPanel.prototype.hideTab = function (panel) {
var self = this;
var panelDeifinitions = self.getPanelsDefinition();
for (var i = 0; i < panelDeifinitions.length; i++) {
if (panel instanceof panelDeifinitions[i].panelClass) {
var panelDefinitions = self.getPanelsDefinition();
for (var i = 0; i < panelDefinitions.length; i++) {
if (panel instanceof panelDefinitions[i].panelClass) {
var liElement = $("li:has(a[href='#left_panel_tab_" + i + "'])", $(self.getElement()))[0];
if (liElement !== undefined) {
liElement.style.display = "none";
......
......@@ -162,7 +162,7 @@ PublicationListDialog.prototype.getColumnsDefinition = function () {
}, {
orderable: false,
searchable: false,
name: "elemnts"
name: "elements"
}];
};
......
......@@ -78,9 +78,9 @@ SearchPanel.prototype.getPanelsDefinition = function() {
SearchPanel.prototype.hideTab = function(panel) {
var self = this;
var panelDeifinitions = self.getPanelsDefinition();
for (var i = 0; i < panelDeifinitions.length; i++) {
if (panel instanceof panelDeifinitions[i].panelClass) {
var panelDefinitions = self.getPanelsDefinition();
for (var i = 0; i < panelDefinitions.length; i++) {
if (panel instanceof panelDefinitions[i].panelClass) {
var liElement = $("li:has(a[href='#search_panel_tab_" + i + "'])", $(self.getElement()))[0];
if (liElement !== undefined) {
liElement.style.display = "none";
......
......@@ -235,6 +235,6 @@ TopMenu.prototype.toggleLegend = function () {
} else {
legend.hide();
}
}
};
module.exports = TopMenu;
\ No newline at end of file
......@@ -35,7 +35,7 @@ function AbstractCustomMap(model, options) {
// layout)
this.selectedLayoutOverlays = [];
// following fields are used in conversion between x,y coordinates and latlng
// following fields are used in conversion between x,y coordinates and lat,lng
// coordinates
this.pixelOrigin_ = new google.maps.Point(this.getTileSize() / 2, this.getTileSize() / 2);
this.pixelsPerLonDegree_ = this.getTileSize() / 360;
......@@ -57,7 +57,7 @@ function AbstractCustomMap(model, options) {
// elements in the client
this._drawingManager = null;
// this is the polgyon that was selected (clicked) last time on the map
// this is the polygon that was selected (clicked) last time on the map
this._selectedArea = null;
// markers should be optimized by default,
......@@ -95,7 +95,7 @@ AbstractCustomMap.prototype.setupLayouts = function () {
* Creates general google maps options used in this map.
*
*/
AbstractCustomMap.prototype.creatMapOptions = function () {
AbstractCustomMap.prototype.createMapOptions = function () {
var self = this;
var centerPoint = this.getModel().getCenterLatLng();
......@@ -224,24 +224,24 @@ AbstractCustomMap.prototype.getMouseLatLng = function () {
* @param pixels
* x,y distance in pixels
* @param zoomLevel
* at which zoom level this pixels where mesaured
* at which zoom level this pixels where measured
*
*/
AbstractCustomMap.prototype.fromPixelsToPoint = function (pixels, zoomLevel) {
var zoomScale = this.getPictureSize() / (Math.pow(2, zoomLevel - this.getMinZoom()) * this.getTileSize());
var pointx = pixels.x * zoomScale;
var pointy = pixels.y * zoomScale;
return new google.maps.Point(pointx, pointy);
var pointX = pixels.x * zoomScale;
var pointY = pixels.y * zoomScale;
return new google.maps.Point(pointX, pointY);
};
/**
* Transforms coordinates on the map from google.maps.LatLng to
* google.maps.Point
*
* @param latlng
* cooordinates in x,y format
* @param coordinates
* @param latLng
* in lat,lng format
* @param coordinates in x,y format
*
*/
AbstractCustomMap.prototype.fromLatLngToPoint = function (latLng) {
var me = this;
......@@ -268,7 +268,7 @@ AbstractCustomMap.prototype.fromLatLngToPoint = function (latLng) {
*
* @param point
* coordinates in standard x,y format
* @return cooordinates in lat,lng format
* @return coordinates in lat,lng format
*/
AbstractCustomMap.prototype.fromPointToLatLng = function (point) {
var me = this;
......@@ -288,11 +288,11 @@ AbstractCustomMap.prototype.fromPointToLatLng = function (point) {
* mouse clicked).
*
*
* @param latlng
* @param latLng
* coordinates in latlng format
* @param z
* zoom level at which we want to find coordinates of tile
* @return cooordinates of a tile
* @return coordinates of a tile
*/
AbstractCustomMap.prototype.latLngToTile = function (latLng, z) {
var worldCoordinate = this.fromLatLngToPoint(latLng);
......@@ -831,7 +831,7 @@ AbstractCustomMap.prototype._createMapChangedCallbacks = function () {
google.maps.event.addListener(this.getGoogleMap(), 'zoom_changed', function () {
sessionData.setZoomLevel(self.getModel(), self.getGoogleMap().getZoom());
});
// listener for changing location of the map (moving left/reght/top/bottom
// listener for changing location of the map (moving left/right/top/bottom
google.maps.event.addListener(this.getGoogleMap(), 'center_changed', function () {
var coord = self.getGoogleMap().getCenter();
var point = self.fromLatLngToPoint(coord);
......@@ -901,11 +901,11 @@ AbstractCustomMap.prototype.getPictureSize = function () {
};
/**
* Returns array containining elements that are presented on a specific layout
* Returns array containing elements that are presented on a specific layout
* (set of google map objects representing lines/areas that are associated with
* layout).
*
* @returns {Array} containining elements that are presented on a specific
* @returns {Array} containing elements that are presented on a specific
* layout (set of google map objects representing lines/areas that are
* associated with layout).
*/
......@@ -926,8 +926,8 @@ AbstractCustomMap.prototype.getGoogleMap = function () {
* Sets google.maps.map object used to representing data.
*
*/
AbstractCustomMap.prototype.setGoogleMap = function (gmap) {
this._map = gmap;
AbstractCustomMap.prototype.setGoogleMap = function (googleMap) {
this._map = googleMap;
};
AbstractCustomMap.prototype.isMarkerOptimization = function () {
......
......@@ -158,7 +158,7 @@ CustomMap.prototype.clearDbOverlays = function () {
* Open data overlay given in the parameter.
*
* @param param
* identifier or LayoutData identifing data overlay to open
* identifier or LayoutData identifying data overlay to open
*/
CustomMap.prototype.openDataOverlay = function (param) {
logger.debug("Opening data overlay: " + param);
......@@ -414,7 +414,7 @@ CustomMap.prototype.openSubmap = function (id) {
};
CustomMap.prototype.customizeGoogleMapView = function (div) {
var mapOptions = this.creatMapOptions();
var mapOptions = this.createMapOptions();
this.setGoogleMap(new google.maps.Map(div, mapOptions));
this.setupLayouts();
......@@ -481,7 +481,7 @@ CustomMap.prototype.createMapChangedCallbacks = function () {
*
* @param identifier
* identifier of the submap
* @returns AbstractCustomMap (submap or this map) with given identfier of the model
* @returns AbstractCustomMap (submap or this map) with given identifier of the model
*/
CustomMap.prototype.getSubmapById = function (identifier) {
identifier = parseInt(identifier);
......@@ -800,7 +800,7 @@ CustomMap.prototype.openInfoWindowForIdentifiedElement = function (element, mark
};
/**
* Sends requestes to download detailed data about element in all
* Sends requests to download detailed data about element in all
* {@link OverlayCollection}.
*
* @param element
......@@ -851,7 +851,7 @@ CustomMap.prototype.updateInfoWindowForIdentifiedElement = function (identifiedE
* {@link Alias} for which overlay data will be returned
* @param general
* if true then all elements will be returned, if false then only ones
* availble right now in the overlay
* available right now in the overlay
* @returns data from all {@link OverlayCollection} for a given alias
*/
CustomMap.prototype.getOverlayDataForAlias = function (alias, general) {
......@@ -866,7 +866,7 @@ CustomMap.prototype.getOverlayDataForAlias = function (alias, general) {
* {@link Reaction} for which overlay data will be returned
* @param general
* if true then all elements will be returned, if false then only ones
* availble right now in the overlay
* available right now in the overlay
* @returns data from all {@link OverlayCollection} for a given alias
*/
CustomMap.prototype.getOverlayDataForReaction = function (reaction, general) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment