Merge pull request #3336 from fredj/getTargetElement
Use ol.Map#getTargetElement function
This commit is contained in:
+2
-13
@@ -1024,13 +1024,7 @@ ol.Map.prototype.handleTargetChanged_ = function() {
|
|||||||
// If it's not now an Element we remove the viewport from the DOM.
|
// If it's not now an Element we remove the viewport from the DOM.
|
||||||
// If it's an Element we append the viewport element to it.
|
// If it's an Element we append the viewport element to it.
|
||||||
|
|
||||||
var target = this.getTarget();
|
var targetElement = this.getTargetElement();
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {Element}
|
|
||||||
*/
|
|
||||||
var targetElement = goog.isDef(target) ?
|
|
||||||
goog.dom.getElement(target) : null;
|
|
||||||
|
|
||||||
this.keyHandler_.detach();
|
this.keyHandler_.detach();
|
||||||
|
|
||||||
@@ -1431,12 +1425,7 @@ ol.Map.prototype.skipFeature = function(feature) {
|
|||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.updateSize = function() {
|
ol.Map.prototype.updateSize = function() {
|
||||||
var target = this.getTarget();
|
var targetElement = this.getTargetElement();
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {Element}
|
|
||||||
*/
|
|
||||||
var targetElement = goog.isDef(target) ? goog.dom.getElement(target) : null;
|
|
||||||
|
|
||||||
if (goog.isNull(targetElement)) {
|
if (goog.isNull(targetElement)) {
|
||||||
this.setSize(undefined);
|
this.setSize(undefined);
|
||||||
|
|||||||
Reference in New Issue
Block a user