Merge pull request #6559 from fredj/cleanup

Remove unneeded type cast
This commit is contained in:
Frédéric Junod
2017-03-06 09:49:05 +01:00
committed by GitHub

View File

@@ -79,10 +79,8 @@ ol.source.ImageStatic.prototype.handleImageChange = function(evt) {
imageWidth = this.imageSize_[0];
imageHeight = this.imageSize_[1];
} else {
// TODO: remove the type cast when a closure-compiler > 20160315 is used.
// see: https://github.com/google/closure-compiler/pull/1664
imageWidth = /** @type {number} */ (image.width);
imageHeight = /** @type {number} */ (image.height);
imageWidth = image.width;
imageHeight = image.height;
}
var resolution = ol.extent.getHeight(imageExtent) / imageHeight;
var targetWidth = Math.ceil(ol.extent.getWidth(imageExtent) / resolution);