Merge pull request #4938 from fredj/rm_goog.dom.getFirstElementChild

Get rid of goog.dom.getFirstElementChild
This commit is contained in:
Frédéric Junod
2016-02-29 17:13:10 +01:00
2 changed files with 3 additions and 3 deletions

View File

@@ -140,7 +140,7 @@ ol.control.FullScreen.prototype.handleFullScreen_ = function() {
ol.control.FullScreen.prototype.handleFullScreenChange_ = function() {
var opened = this.cssClassName_ + '-true';
var closed = this.cssClassName_ + '-false';
var button = goog.dom.getFirstElementChild(this.element);
var button = this.element.firstElementChild;
var map = this.getMap();
if (goog.dom.fullscreen.isFullScreen()) {
goog.dom.classlist.swap(button, closed, opened);

View File

@@ -176,7 +176,7 @@ ol.control.ZoomSlider.prototype.initSlider_ = function() {
var container = this.element;
var containerSize = goog.style.getSize(container);
var thumb = goog.dom.getFirstElementChild(container);
var thumb = container.firstElementChild;
var thumbMargins = goog.style.getMarginBox(thumb);
var thumbBorderBoxSize = goog.style.getBorderBoxSize(thumb);
var thumbWidth = thumbBorderBoxSize.width +
@@ -328,7 +328,7 @@ ol.control.ZoomSlider.prototype.handleDraggerEnd_ = function(event) {
*/
ol.control.ZoomSlider.prototype.setThumbPosition_ = function(res) {
var position = this.getPositionForResolution_(res);
var thumb = goog.dom.getFirstElementChild(this.element);
var thumb = this.element.firstElementChild;
if (this.direction_ == ol.control.ZoomSlider.direction.HORIZONTAL) {
thumb.style.left = this.widthLimit_ * position + 'px';