Merge pull request #4639 from nicholas-l/googBind

Remove use of goog.bind and use ES5 .bind.
This commit is contained in:
Tim Schaub
2016-01-15 09:41:11 -08:00
27 changed files with 64 additions and 58 deletions

View File

@@ -98,7 +98,7 @@ ol.interaction.MouseWheelZoom.handleEvent = function(mapBrowserEvent) {
goog.global.clearTimeout(this.timeoutId_);
this.timeoutId_ = goog.global.setTimeout(
goog.bind(this.doZoom_, this, map), timeLeft);
this.doZoom_.bind(this, map), timeLeft);
mapBrowserEvent.preventDefault();
stopEvent = true;

View File

@@ -120,7 +120,7 @@ ol.interaction.Snap = function(opt_options) {
* @type {function(ol.interaction.Snap.SegmentDataType, ol.interaction.Snap.SegmentDataType): number}
* @private
*/
this.sortByDistance_ = goog.bind(ol.interaction.Snap.sortByDistance, this);
this.sortByDistance_ = ol.interaction.Snap.sortByDistance.bind(this);
/**
@@ -170,7 +170,7 @@ ol.interaction.Snap.prototype.addFeature = function(feature, opt_listen) {
if (listen) {
this.geometryModifyListenerKeys_[feature_uid] = geometry.on(
goog.events.EventType.CHANGE,
goog.bind(this.handleGeometryModify_, this, feature),
this.handleGeometryModify_.bind(this, feature),
this);
this.geometryChangeListenerKeys_[feature_uid] = feature.on(
ol.Object.getChangeEventType(feature.getGeometryName()),