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