Get rid of goog.dom.getFirstElementChild
Use [firstElementChild](https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/firstElementChild) instead.
This commit is contained in:
@@ -140,7 +140,7 @@ ol.control.FullScreen.prototype.handleFullScreen_ = function() {
|
|||||||
ol.control.FullScreen.prototype.handleFullScreenChange_ = function() {
|
ol.control.FullScreen.prototype.handleFullScreenChange_ = function() {
|
||||||
var opened = this.cssClassName_ + '-true';
|
var opened = this.cssClassName_ + '-true';
|
||||||
var closed = this.cssClassName_ + '-false';
|
var closed = this.cssClassName_ + '-false';
|
||||||
var button = goog.dom.getFirstElementChild(this.element);
|
var button = this.element.firstElementChild;
|
||||||
var map = this.getMap();
|
var map = this.getMap();
|
||||||
if (goog.dom.fullscreen.isFullScreen()) {
|
if (goog.dom.fullscreen.isFullScreen()) {
|
||||||
goog.dom.classlist.swap(button, closed, opened);
|
goog.dom.classlist.swap(button, closed, opened);
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ ol.control.ZoomSlider.prototype.initSlider_ = function() {
|
|||||||
var container = this.element;
|
var container = this.element;
|
||||||
var containerSize = goog.style.getSize(container);
|
var containerSize = goog.style.getSize(container);
|
||||||
|
|
||||||
var thumb = goog.dom.getFirstElementChild(container);
|
var thumb = container.firstElementChild;
|
||||||
var thumbMargins = goog.style.getMarginBox(thumb);
|
var thumbMargins = goog.style.getMarginBox(thumb);
|
||||||
var thumbBorderBoxSize = goog.style.getBorderBoxSize(thumb);
|
var thumbBorderBoxSize = goog.style.getBorderBoxSize(thumb);
|
||||||
var thumbWidth = thumbBorderBoxSize.width +
|
var thumbWidth = thumbBorderBoxSize.width +
|
||||||
@@ -328,7 +328,7 @@ ol.control.ZoomSlider.prototype.handleDraggerEnd_ = function(event) {
|
|||||||
*/
|
*/
|
||||||
ol.control.ZoomSlider.prototype.setThumbPosition_ = function(res) {
|
ol.control.ZoomSlider.prototype.setThumbPosition_ = function(res) {
|
||||||
var position = this.getPositionForResolution_(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) {
|
if (this.direction_ == ol.control.ZoomSlider.direction.HORIZONTAL) {
|
||||||
thumb.style.left = this.widthLimit_ * position + 'px';
|
thumb.style.left = this.widthLimit_ * position + 'px';
|
||||||
|
|||||||
Reference in New Issue
Block a user