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
+2 -2
View File
@@ -291,12 +291,12 @@ ol.style.Circle.prototype.render_ = function(atlasManager) {
if (hasCustomHitDetectionImage) {
// render the hit-detection image into a separate atlas image
renderHitDetectionCallback =
goog.bind(this.drawHitDetectionCanvas_, this, renderOptions);
this.drawHitDetectionCanvas_.bind(this, renderOptions);
}
var id = this.getChecksum();
var info = atlasManager.add(
id, size, size, goog.bind(this.draw_, this, renderOptions),
id, size, size, this.draw_.bind(this, renderOptions),
renderHitDetectionCallback);
goog.asserts.assert(info, 'circle radius is too large');
+2 -2
View File
@@ -371,12 +371,12 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
if (hasCustomHitDetectionImage) {
// render the hit-detection image into a separate atlas image
renderHitDetectionCallback =
goog.bind(this.drawHitDetectionCanvas_, this, renderOptions);
this.drawHitDetectionCanvas_.bind(this, renderOptions);
}
var id = this.getChecksum();
var info = atlasManager.add(
id, size, size, goog.bind(this.draw_, this, renderOptions),
id, size, size, this.draw_.bind(this, renderOptions),
renderHitDetectionCallback);
goog.asserts.assert(info, 'shape size is too large');