Remove getSize
This commit is contained in:
@@ -185,7 +185,9 @@ ol.control.ZoomSlider.prototype.setMap = function(map) {
|
||||
*/
|
||||
ol.control.ZoomSlider.prototype.initSlider_ = function() {
|
||||
var container = this.element;
|
||||
var containerSize = goog.style.getSize(container);
|
||||
var containerSize = {
|
||||
width: container.offsetWidth, height: container.offsetHeight
|
||||
};
|
||||
|
||||
var thumb = container.firstElementChild;
|
||||
var thumbMargins = goog.style.getMarginBox(thumb);
|
||||
|
||||
@@ -528,7 +528,7 @@ ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
|
||||
if (positioning == ol.OverlayPositioning.BOTTOM_CENTER ||
|
||||
positioning == ol.OverlayPositioning.CENTER_CENTER ||
|
||||
positioning == ol.OverlayPositioning.TOP_CENTER) {
|
||||
offsetX -= goog.style.getSize(this.element_).width / 2;
|
||||
offsetX -= this.element_.offsetWidth / 2;
|
||||
}
|
||||
var left = Math.round(pixel[0] + offsetX) + 'px';
|
||||
if (this.rendered_.left_ != left) {
|
||||
@@ -552,7 +552,7 @@ ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
|
||||
if (positioning == ol.OverlayPositioning.CENTER_LEFT ||
|
||||
positioning == ol.OverlayPositioning.CENTER_CENTER ||
|
||||
positioning == ol.OverlayPositioning.CENTER_RIGHT) {
|
||||
offsetY -= goog.style.getSize(this.element_).height / 2;
|
||||
offsetY -= this.element_.offsetHeight / 2;
|
||||
}
|
||||
var top = Math.round(pixel[1] + offsetY) + 'px';
|
||||
if (this.rendered_.top_ != top) {
|
||||
|
||||
Reference in New Issue
Block a user