Better variables scoping
This commit is contained in:
@@ -74,9 +74,8 @@ Atlas.prototype.get = function(id) {
|
||||
* @return {?ol.AtlasInfo} The position and atlas image for the entry.
|
||||
*/
|
||||
Atlas.prototype.add = function(id, width, height, renderCallback, opt_this) {
|
||||
let block, i, ii;
|
||||
for (i = 0, ii = this.emptyBlocks_.length; i < ii; ++i) {
|
||||
block = this.emptyBlocks_[i];
|
||||
for (let i = 0, ii = this.emptyBlocks_.length; i < ii; ++i) {
|
||||
const block = this.emptyBlocks_[i];
|
||||
if (block.width >= width + this.space_ &&
|
||||
block.height >= height + this.space_) {
|
||||
// we found a block that is big enough for our entry
|
||||
|
||||
@@ -109,10 +109,9 @@ AtlasManager.prototype.getInfo = function(id) {
|
||||
* or `null` if the entry is not part of the atlases.
|
||||
*/
|
||||
AtlasManager.prototype.getInfo_ = function(atlases, id) {
|
||||
let atlas, info, i, ii;
|
||||
for (i = 0, ii = atlases.length; i < ii; ++i) {
|
||||
atlas = atlases[i];
|
||||
info = atlas.get(id);
|
||||
for (let i = 0, ii = atlases.length; i < ii; ++i) {
|
||||
const atlas = atlases[i];
|
||||
const info = atlas.get(id);
|
||||
if (info) {
|
||||
return info;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user