Skip to content

Commit 6e341da

Browse files
author
André Gaul
committed
do not update fine view on sync
1 parent dbc0595 commit 6e341da

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

views/fine.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module.exports = Backbone.View.extend({
99
this.proxyView = options.proxyView;
1010
this.layer = L.markerClusterGroup().addTo(this.proxyView.mapView.map);
1111
this.subviews = {};
12-
this.listenTo(this.collection, 'sync', this.render);
1312
this.listenTo(this.collection, 'add', this.addModel);
1413
this.listenTo(this.collection, 'remove', this.removeModel);
1514
this.render();

views/fineMarker.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ module.exports = Backbone.View.extend({
1717
.addTo(this.layer);
1818
},
1919
remove: function() {
20-
this.layer.removeLayer(this.marker);
20+
if (this.marker) {
21+
this.layer.removeLayer(this.marker);
22+
this.marker = undefined;
23+
}
2124
}
2225
});
2326

0 commit comments

Comments
 (0)