Skip to content

Commit d8d58dd

Browse files
committed
Fix mistake in filtered map.search results
1 parent 82a840c commit d8d58dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/HashMap.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@
9797
obj = results[i];
9898
if (!obj) continue; //skip if deleted
9999
id = obj[0]; //unique ID
100-
100+
obj = obj._mbr || obj
101101
//check if not added to hash and that actually intersects
102-
if (!found[id] && obj.x < rect._x + rect._w && obj._x + obj._w > rect._x &&
103-
obj.y < rect._y + rect._h && obj._h + obj._y > rect._y)
102+
if (!found[id] && obj._x < rect._x + rect._w && obj._x + obj._w > rect._x &&
103+
obj._y < rect._y + rect._h && obj._h + obj._y > rect._y)
104104
found[id] = results[i];
105105
}
106106

0 commit comments

Comments
 (0)