<commit_before>goog.provide('ol.dom.Map');

goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.math.Coordinate');
goog.require('goog.style');
goog.require('ol.Map');
goog.require('ol.TileLayer');
goog.require('ol.dom.TileLayerRenderer');



/**
 * @constructor
 * @extends {ol.Map}
 * @param {!HTMLDivElement} target Target.
 * @param {Object.<string, *>=} opt_values Values.
 */
ol.dom.Map = function(target, opt_values) {
  goog.base(this, target);

  /**
   * @type {Element}
   * @private
   */
  this.layersPane_ = goog.dom.createElement(goog.dom.TagName.DIV);
  this.layersPane_.style.position = 'absolute';
  this.layersPane_.className = 'ol-renderer-dom';
  target.appendChild(this.layersPane_);

  /**
   * @type {Object}
   * @private
   */
  this.layerPanes_ = {};

  if (goog.isDef(opt_values)) {
    this.setValues(opt_values);
  }

  this.handleViewportResize();

};
goog.inherits(ol.dom.Map, ol.Map);


/**
 * Reset the layers pane to its initial position.
 * @private
 */
ol.dom.Map.prototype.resetLayersPane_ = function() {
  var offset = new goog.math.Coordinate(0, 0);
  goog.style.setPosition(this.layersPane_, offset);
};


/**
 * Move the layers pane.<commit_msg>dom map renderer - add a viewport div to the top of hierarchy, this is to handle overflow of tiles<commit_after>goog.provide('ol.dom.Map');

goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.math.Coordinate');
goog.require('goog.style');
goog.require('ol.Map');
goog.require('ol.TileLayer');
goog.require('ol.dom.TileLayerRenderer');



/**
 * @constructor
 * @extends {ol.Map}
 * @param {!HTMLDivElement} target Target.
 * @param {Object.<string, *>=} opt_values Values.
 */
ol.dom.Map = function(target, opt_values) {
  goog.base(this, target);

  /**
   * @type {!Element}
   * @private
   */
  this.viewport_ = goog.dom.createElement(goog.dom.TagName.DIV);
  this.viewport_.className = 'ol-viewport';
  this.viewport_.style.position = 'relative';
  this.viewport_.style.overflow = 'hidden';
  this.viewport_.style.width = '100%';
  this.viewport_.style.height = '100%';
  target.appendChild(this.viewport_);

  /**
   * @type {!Element}
   * @private
   */
  this.layersPane_ = goog.dom.createElement(goog.dom.TagName.DIV);
  this.layersPane_.className = 'ol-layers-pane';
  this.layersPane_.style.position = 'absolute';
  this.viewport_.appendChild(this.layersPane_);

  /**
   * @type {Object}
   * @private
   */
  this.layerPanes_ = {};

  if (goog.isDef(opt_values)) {
    this.setValues(opt_values);
  }

  this.handleViewportResize();

};
goog.inherits(ol.dom.Map, ol.Map);


/**
 * Reset the layers pane to its initial position.
 * @private
 */
ol.dom.Map.prototype.resetLayersPane_ = function() {
  var offset = new goog.math.Coordinate(0, 0);
  goog.style.setPosition(this.layersPane_, offset);
};


/**
 * Move the layers pane.
{'fraction_non_alphanumeric': 0.1800271739130435, 'fraction_numerical': 0.0033967391304347825, 'mean_word_length': 4.034188034188034, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '64870', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1014, 'n_words': 167}