[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user