[view/map,bugfix,refactor][s]: correct bug due to misinterpretation (?) of Backbone reset and refactor so we redraw on initialize.

* Bug: dataset.currentDocuments.reset was being interpreted as empty rather than a re-fill of new documents and was therefore not re-adding currentDocuments items to the list of features. Fixed this.
* Discovered bug during a refactor. Refactor removed listener for query:done as this will be covered by currentDocuments.reset or similar. This also means we can initialize the view with a dataset already containing data and it will render w/o need to call query() again.
This commit is contained in:
Rufus Pollock
2012-05-20 13:43:33 +01:00
parent ffe07e4ad5
commit 62a790ceb9
2 changed files with 16 additions and 23 deletions

View File

@@ -49,7 +49,7 @@ test('Lat/Lon geom fields', function () {
});
$('.fixtures').append(view.el);
//Fire query, otherwise the map won't be initialized
// Not really needed but fire query to test that resetting works!
dataset.query();
// Check that all markers were created