Remove use of goog.bind and use ES5 .bind

This commit is contained in:
Nicholas L
2016-01-08 23:41:24 +13:00
parent ace3ac4f1d
commit db3ad70a3d
27 changed files with 64 additions and 58 deletions

View File

@@ -135,8 +135,8 @@ ol.Geolocation.prototype.handleTrackingChanged_ = function() {
var tracking = this.getTracking();
if (tracking && this.watchId_ === undefined) {
this.watchId_ = goog.global.navigator.geolocation.watchPosition(
goog.bind(this.positionChange_, this),
goog.bind(this.positionError_, this),
this.positionChange_.bind(this),
this.positionError_.bind(this),
this.getTrackingOptions());
} else if (!tracking && this.watchId_ !== undefined) {
goog.global.navigator.geolocation.clearWatch(this.watchId_);