Use block scoping

This commit is contained in:
Tim Schaub
2016-01-04 20:00:37 -07:00
parent 29a723166d
commit ec10b661f3
2 changed files with 6 additions and 6 deletions

View File

@@ -207,11 +207,11 @@ ol.format.MVT.prototype.setLayers = function(layers) {
ol.format.MVT.calculateFlatCoordinates_ = function( ol.format.MVT.calculateFlatCoordinates_ = function(
coords, flatCoordinates, ends) { coords, flatCoordinates, ends) {
var end = 0; var end = 0;
var line, coord;
for (var i = 0, ii = coords.length; i < ii; ++i) { for (var i = 0, ii = coords.length; i < ii; ++i) {
line = coords[i]; var line = coords[i];
for (var j = 0, jj = line.length; j < jj; ++j) { var j, jj;
coord = line[j]; for (j = 0, jj = line.length; j < jj; ++j) {
var coord = line[j];
// Non-tilespace coords can be calculated here when a TileGrid and // Non-tilespace coords can be calculated here when a TileGrid and
// TileCoord are known. // TileCoord are known.
flatCoordinates.push(coord.x, coord.y); flatCoordinates.push(coord.x, coord.y);

View File

@@ -600,8 +600,8 @@ ol.interaction.Modify.handleDownEvent_ = function(evt) {
if (insertVertices.length) { if (insertVertices.length) {
this.willModifyFeatures_(evt); this.willModifyFeatures_(evt);
} }
for (i = insertVertices.length - 1; i >= 0; --i) { for (var j = insertVertices.length - 1; j >= 0; --j) {
this.insertVertex_.apply(this, insertVertices[i]); this.insertVertex_.apply(this, insertVertices[j]);
} }
} }
return !!this.vertexFeature_; return !!this.vertexFeature_;