Skip to content

Commit

Permalink
was misspelled
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenbs committed Jan 11, 2012
1 parent d7e837b commit a3f5ed6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/HashMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ HashMap.prototype = {
hash.max.x = coord[0];
for (k in this.map[h]) {
ent = this.map[h][k];
if (typeof ent == 'object' && 'required' in ent) {
//make sure that this is a Crafty entity
if (typeof ent == 'object' && 'requires' in ent) {
coords.max.x = Math.max(coords.max.x, ent.x + ent.w);
}
}
Expand All @@ -128,7 +129,7 @@ HashMap.prototype = {
hash.min.x = coord[0];
for (k in this.map[h]) {
ent = this.map[h][k];
if (typeof ent == 'object' && 'required' in ent) {
if (typeof ent == 'object' && 'requires' in ent) {
coords.min.x = Math.min(coords.min.x, ent.x);
}
}
Expand All @@ -137,7 +138,7 @@ HashMap.prototype = {
hash.max.y = coord[1];
for (k in this.map[h]) {
ent = this.map[h][k];
if (typeof ent == 'object' && 'required' in ent) {
if (typeof ent == 'object' && 'requires' in ent) {
coords.max.y = Math.max(coords.max.y, ent.y + ent.h);
}
}
Expand All @@ -146,7 +147,7 @@ HashMap.prototype = {
hash.min.y = coord[1];
for (k in this.map[h]) {
ent = this.map[h][k];
if (typeof ent == 'object' && 'required' in ent) {
if (typeof ent == 'object' && 'requires' in ent) {
coords.min.y = Math.min(coords.min.y, ent.y);
}
}
Expand Down

0 comments on commit a3f5ed6

Please sign in to comment.