Remove use of goog.math.Size
This commit is contained in:
@@ -282,17 +282,17 @@ ol.control.OverviewMap.prototype.validateExtent_ = function() {
|
|||||||
ovmap.getPixelFromCoordinate(ol.extent.getTopLeft(extent));
|
ovmap.getPixelFromCoordinate(ol.extent.getTopLeft(extent));
|
||||||
var bottomRightPixel =
|
var bottomRightPixel =
|
||||||
ovmap.getPixelFromCoordinate(ol.extent.getBottomRight(extent));
|
ovmap.getPixelFromCoordinate(ol.extent.getBottomRight(extent));
|
||||||
var boxSize = new goog.math.Size(
|
|
||||||
Math.abs(topLeftPixel[0] - bottomRightPixel[0]),
|
var boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);
|
||||||
Math.abs(topLeftPixel[1] - bottomRightPixel[1]));
|
var boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);
|
||||||
|
|
||||||
var ovmapWidth = ovmapSize[0];
|
var ovmapWidth = ovmapSize[0];
|
||||||
var ovmapHeight = ovmapSize[1];
|
var ovmapHeight = ovmapSize[1];
|
||||||
|
|
||||||
if (boxSize.width < ovmapWidth * ol.OVERVIEWMAP_MIN_RATIO ||
|
if (boxWidth < ovmapWidth * ol.OVERVIEWMAP_MIN_RATIO ||
|
||||||
boxSize.height < ovmapHeight * ol.OVERVIEWMAP_MIN_RATIO ||
|
boxHeight < ovmapHeight * ol.OVERVIEWMAP_MIN_RATIO ||
|
||||||
boxSize.width > ovmapWidth * ol.OVERVIEWMAP_MAX_RATIO ||
|
boxWidth > ovmapWidth * ol.OVERVIEWMAP_MAX_RATIO ||
|
||||||
boxSize.height > ovmapHeight * ol.OVERVIEWMAP_MAX_RATIO) {
|
boxHeight > ovmapHeight * ol.OVERVIEWMAP_MAX_RATIO) {
|
||||||
this.resetExtent_();
|
this.resetExtent_();
|
||||||
} else if (!ol.extent.containsExtent(ovextent, extent)) {
|
} else if (!ol.extent.containsExtent(ovextent, extent)) {
|
||||||
this.recenter_();
|
this.recenter_();
|
||||||
|
|||||||
Reference in New Issue
Block a user