Browse files

Removing _.bindAll

  • Loading branch information...
1 parent 7ce4862 commit 505629d0d528cad6c43004250bf783544285f5bb @jack7890 committed Feb 22, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 public/js/app.js
View
6 public/js/app.js
@@ -60,7 +60,6 @@ $(function() {
this.date = this.collection.date;
this.latlon = this.collection.latlon;
this.zoom = this.options.zoom;
- _.bindAll(this, "handleMapChange");
this.collection.bind("add", function(model) {
that.addOneEvent(model);
});
@@ -184,16 +183,15 @@ $(function() {
};
this.map = new google.maps.Map($('#map')[0], this.mapOptions);
this.renderDateLabel();
- google.maps.event.addListener(this.map, 'bounds_changed', this.handleMapChange);
+ google.maps.event.addListener(this.map, 'bounds_changed', _.bind(this.handleMapChange, this));
}
});
lr.EventView = Backbone.View.extend({
initialize: function() {
- _.bindAll(this, "deleteMarker");
this.bucket = this.bucket();
this.markerScale = this.scaleShadow();
- this.model.bind('change', this.deleteMarker);
+ this.model.bind('change', _.bind(this.deleteMarker, this));
this.latLon = new google.maps.LatLng(this.model.attributes.venue.location.lat,this.model.attributes.venue.location.lon);
this.pinImage = new google.maps.MarkerImage("/img/markers/marker_" + this.bucket + ".png",
new google.maps.Size(lr.Settings.markers[this.bucket].size.width, lr.Settings.markers[this.bucket].size.height),

0 comments on commit 505629d

Please sign in to comment.