Deal with ol.global issues

This commit is contained in:
Tim Schaub
2016-08-31 07:42:35 -06:00
parent 9e1a3f59e3
commit ff8a84a220
10 changed files with 64 additions and 45 deletions
+4 -3
View File
@@ -1,11 +1,11 @@
goog.provide('ol.Overlay');
goog.require('ol');
goog.require('ol.events');
goog.require('ol.MapEventType');
goog.require('ol.Object');
goog.require('ol.animation');
goog.require('ol.dom');
goog.require('ol.events');
goog.require('ol.extent');
@@ -398,9 +398,10 @@ ol.Overlay.prototype.panIntoView_ = function() {
* @private
*/
ol.Overlay.prototype.getRect_ = function(element, size) {
var global = ol.global;
var box = element.getBoundingClientRect();
var offsetX = box.left + ol.global.pageXOffset;
var offsetY = box.top + ol.global.pageYOffset;
var offsetX = box.left + global.pageXOffset;
var offsetY = box.top + global.pageYOffset;
return [
offsetX,
offsetY,