Remove use of goog.style.setBorderBoxSize
This commit is contained in:
@@ -5,8 +5,6 @@ goog.require('goog.dom');
|
|||||||
goog.require('goog.dom.classlist');
|
goog.require('goog.dom.classlist');
|
||||||
goog.require('ol.events');
|
goog.require('ol.events');
|
||||||
goog.require('ol.events.EventType');
|
goog.require('ol.events.EventType');
|
||||||
goog.require('goog.math.Size');
|
|
||||||
goog.require('goog.style');
|
|
||||||
goog.require('ol');
|
goog.require('ol');
|
||||||
goog.require('ol.Collection');
|
goog.require('ol.Collection');
|
||||||
goog.require('ol.Map');
|
goog.require('ol.Map');
|
||||||
@@ -111,7 +109,9 @@ ol.control.OverviewMap = function(opt_options) {
|
|||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
var box = goog.dom.createDom('DIV', 'ol-overviewmap-box');
|
var box = document.createElement('DIV');
|
||||||
|
box.className = 'ol-overviewmap-box';
|
||||||
|
box.style.boxSizing = 'border-box';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {ol.Overlay}
|
* @type {ol.Overlay}
|
||||||
@@ -396,10 +396,8 @@ ol.control.OverviewMap.prototype.updateBox_ = function() {
|
|||||||
|
|
||||||
// set box size calculated from map extent size and overview map resolution
|
// set box size calculated from map extent size and overview map resolution
|
||||||
if (box) {
|
if (box) {
|
||||||
var boxWidth = Math.abs((bottomLeft[0] - topRight[0]) / ovresolution);
|
box.style.width = Math.abs((bottomLeft[0] - topRight[0]) / ovresolution) + 'px';
|
||||||
var boxHeight = Math.abs((topRight[1] - bottomLeft[1]) / ovresolution);
|
box.style.height = Math.abs((topRight[1] - bottomLeft[1]) / ovresolution) + 'px';
|
||||||
goog.style.setBorderBoxSize(box, new goog.math.Size(
|
|
||||||
boxWidth, boxHeight));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user