Skip to content

Commit cd51ef3

Browse files
committed
cleaned, working
1 parent 5add833 commit cd51ef3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/neighborhood.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = class Neighborhood extends Subtype {
4848
const asset = this.drawer.getBackgroundTileInfo(row, col);
4949
if (asset) {
5050
// add asset id to the assetList
51-
this.assetList.push(`${tileId}-asset`);
51+
this.assetList.push("tileElement" + `${tileId}-asset`);
5252
// add assset on top of blank tile if it exists
5353
// asset is in format {name: 'sample name', sheet: x, row: y, column: z}
5454
const assetHref = this.skin_.assetUrl(asset.sheet);

src/neighborhoodDrawer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,14 @@ module.exports = class NeighborhoodDrawer extends Drawer {
277277
// Iterates through all neighborhood assets and inserts them after the pegman
278278
drawAssets() {
279279
let assetList = this.neighborhood.getAssetList();
280-
assetList.forEach(function (asset) {
280+
var i;
281+
for (i = 0; i < assetList.length; i++) {
282+
let asset = assetList[i];
281283
let node = document.getElementById(asset);
282-
console.log(node);
283-
console.log(this);
284284
let pegmanElement =
285285
this.svg_.getElementsByClassName("pegman-location")[0];
286286
this.svg_.insertBefore(node, pegmanElement);
287-
});
287+
}
288288
}
289289

290290
/**

0 commit comments

Comments
 (0)