Remove goog.style.getMarginBox

This commit is contained in:
nicholas
2016-03-25 18:21:19 +13:00
committed by Nicholas L
parent 04c4b4efc1
commit 837c48a2e2

View File

@@ -190,7 +190,13 @@ ol.control.ZoomSlider.prototype.initSlider_ = function() {
};
var thumb = container.firstElementChild;
var thumbMargins = goog.style.getMarginBox(thumb);
var thumbComputedStyles = window.getComputedStyle(thumb);
var thumbMargins = {
left: parseFloat(thumbComputedStyles['marginLeft']),
right: parseFloat(thumbComputedStyles['marginRight']),
top: parseFloat(thumbComputedStyles['marginTop']),
bottom: parseFloat(thumbComputedStyles['marginBottom'])
};
var thumbBorderBoxSize = goog.style.getBorderBoxSize(thumb);
var thumbWidth = thumbBorderBoxSize.width +
thumbMargins.right + thumbMargins.left;