Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fixed lint errors

Benjamin96f2b86c4f01
diff --git a/web/js/map/wv.map.runningdata.js b/web/js/map/wv.map.runningdata.js
index 65f1d6e64..379a68bf8 100644
--- a/web/js/map/wv.map.runningdata.js
+++ b/web/js/map/wv.map.runningdata.js
@@ -26,10 +26,10 @@ wv.map.runningdata = wv.map.runningdata || function(models) {
for(var i = 0, len = scale.colors.length; i < len; i++) {
if(scale.colors[i] === hex) {
return {label:scale.labels[i], len: len, index:i};
- };
- };
+ }
+ }
return undefined;
- }
+ };
self.getLabelMarginLeft = function(labelWidth, caseWidth, location) {
if(location + (labelWidth / 2) > caseWidth) {
@@ -39,10 +39,10 @@ wv.map.runningdata = wv.map.runningdata || function(models) {
} else {
return (location - (labelWidth / 2));
}
- }
+ };
self.getPalette = function(id) {
return $('#' + id + '_palette');
- }
+ };
self.getPercent = function(len, index, caseWidth) {
var segmentWidth;
var location;
@@ -53,10 +53,10 @@ wv.map.runningdata = wv.map.runningdata || function(models) {
} else {
return (index / len);
}
- }
+ };
self.LayersToRemove = function(oldArray, newArray) {
return _.difference(oldArray, newArray);
- }
+ };
self.newPoint = function(coords, map) {
self.activeLayers = [];
@@ -66,7 +66,7 @@ wv.map.runningdata = wv.map.runningdata || function(models) {
var palette;
var paletteInfo;
if(layer.wv.def.palette){
- var palette = models.palettes.get(layer.wv.id);
+ palette = models.palettes.get(layer.wv.id);
if(palette) {
hex = wv.util.rgbaToHex(data[0], data[1], data[2]);
if(palette.scale) {
@@ -81,8 +81,8 @@ wv.map.runningdata = wv.map.runningdata || function(models) {
}
}
self.activeLayers.push(palette.id +'_palette');
- };
- };
+ }
+ }
});
if(self.oldLayers.length) {
self.updateRunners(self.LayersToRemove(self.oldLayers, self.activeLayers));
@@ -94,7 +94,7 @@ wv.map.runningdata = wv.map.runningdata || function(models) {
var $paletteCase = $palette.parent();
$paletteCase.removeClass('wv-running');
$palette.removeClass('wv-running');
- }
+ };
self.setCategoryValue = function(id, data) {
var $categoryPaletteCase;
var $caseWidth;
@@ -124,8 +124,7 @@ wv.map.runningdata = wv.map.runningdata || function(models) {
$categoryPaletteCase.addClass('wv-running');
$categoryPaletteCase.find('.wv-active').removeClass('wv-active');
$colorSquare.addClass('wv-active');
-
- }
+ };
self.setLayerValue = function(id, data) {
var $palette;
var $paletteCase;
@@ -144,7 +143,7 @@ wv.map.runningdata = wv.map.runningdata || function(models) {
$paletteBar = $paletteCase.find('.wv-running-bar');
percent = self.getPercent(data.len, data.index, $paletteWidth);
- margin = (($paletteCaseWidth - $paletteWidth) / 2)
+ margin = (($paletteCaseWidth - $paletteWidth) / 2);
location = ($paletteWidth * percent + margin);
@@ -156,12 +155,12 @@ wv.map.runningdata = wv.map.runningdata || function(models) {
$paletteLabel.attr('style', 'left:' + Math.round(labelMargin) + 'px;');
$paletteBar.attr('style', 'left:' + Math.round(location) + 'px;');
$paletteCase.addClass('wv-running');
- }
+ };
self.updateRunners = function(layers) {
if(layers.length) {
for(var i = 0, len = layers.length; i < len; i++) {
self.remove(layers[i]);
- };
- };
- }
+ }
+ }
+ };
};
\ No newline at end of file
diff --git a/web/js/map/wv.map.ui.js b/web/js/map/wv.map.ui.js
index 38f72424b..0d1f9690f 100644
--- a/web/js/map/wv.map.ui.js
+++ b/web/js/map/wv.map.ui.js
@@ -492,10 +492,10 @@ wv.map.ui = wv.map.ui || function(models, config, Rotation, DataRunner) {
map.getView().on("change:rotation", rotation.updateRotation);
map.on('pointerdrag', function() {
mapIsbeingDragged = true;
- })
+ });
map.on('moveend', function() {
mapIsbeingDragged = false;
- })
+ });
return map;
};
@@ -636,7 +636,7 @@ wv.map.ui = wv.map.ui || function(models, config, Rotation, DataRunner) {
pixels = [e.pageX,e.pageY];
coords = map.getCoordinateFromPixel(pixels);
- pixelValue = [pixels[0] * pixelRatio, pixels[1] * pixelRatio]
+ pixelValue = [pixels[0] * pixelRatio, pixels[1] * pixelRatio];
$('#' + mapId).show();
$('#' + mapId + ' span.map-coord').each(function(){
var format = $(this).attr('data-format');
@@ -648,7 +648,7 @@ wv.map.ui = wv.map.ui || function(models, config, Rotation, DataRunner) {
return;
}
dataRunner.newPoint(pixelValue, map);
- };
+ }
$(map.getViewport())
.mouseover(function(){
$('#' + mapId).show();
diff --git a/web/js/util/wv.util.js b/web/js/util/wv.util.js
index 19819d75f..67d251cda 100644
--- a/web/js/util/wv.util.js
+++ b/web/js/util/wv.util.js
@@ -499,11 +499,11 @@ wv.util = (function(self) {
};
self.rgbaToHex = function(r, g, b) {
function hex(c) {
- var hex = c.toString(16);
- return hex.length == 1 ? "0" + hex : hex;
+ var strHex = c.toString(16);
+ return strHex.length == 1 ? "0" + strHex : strHex;
}
return hex(r) + hex(g) + hex(b) + 'ff';
- }
+ };
/**
* Submits an AJAX request or retreives the result from the cache.