fix a bug where the n largest places would not appear in a map view
This commit is contained in:
parent
0e5172a8fa
commit
6ad45105af
1 changed files with 2 additions and 2 deletions
|
@ -716,9 +716,9 @@ Ox.Map = function(options, self) {
|
|||
self.places.sort(function(a, b) {
|
||||
var sort = {
|
||||
a: a.selected ? Infinity :
|
||||
bounds.contains(a.center) ? a.size : -Infinity,
|
||||
bounds.contains(a.center) ? a.area : -Infinity,
|
||||
b: b.selected ? Infinity :
|
||||
bounds.contains(b.center) ? b.size : -Infinity,
|
||||
bounds.contains(b.center) ? b.area : -Infinity,
|
||||
};
|
||||
return sort.b - sort.a;
|
||||
}).forEach(function(place, i) {
|
||||
|
|
Loading…
Reference in a new issue