From 6ad45105af5975626c41d64f6de11bb7d3d2737d Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 24 May 2011 14:02:08 +0200 Subject: [PATCH] fix a bug where the n largest places would not appear in a map view --- source/Ox.UI/js/Map/Ox.Map.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Map/Ox.Map.js b/source/Ox.UI/js/Map/Ox.Map.js index 24ee7860..416c2f76 100644 --- a/source/Ox.UI/js/Map/Ox.Map.js +++ b/source/Ox.UI/js/Map/Ox.Map.js @@ -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) {