From 1e21bbb94d0d9c5e4311634045da79751604aa5b Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 2 Mar 2013 06:29:35 -0800 Subject: [PATCH] Add thousands separator and bug fix --- code/map_data.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/map_data.js b/code/map_data.js index 2366b533..2731ff1a 100644 --- a/code/map_data.js +++ b/code/map_data.js @@ -563,15 +563,17 @@ window.renderField = function(ent) { icon: L.divIcon({ className: 'fieldmu', iconSize: [100,12], - html: 'MU: ' + ent[2].entityScore.entityScore}), + html: 'MU: ' + digits(ent[2].entityScore.entityScore)}), clickable: false }); // put both in one group, so they can be handled by the same logic. - var f = L.layerGroup([poly, fieldMu], { + var f = L.layerGroup([poly, fieldMu]); + f.options = { vertices: reg, lastUpdate: ent[1], - guid: ent[0]}); + guid: ent[0] + }; // However, LayerGroups (and FeatureGroups) don’t fire add/remove // events, thus this listener will be attached to the field. It