Remove use of goog.style.getClientPosition
Use Element.getBoundingClientRect() instead.
This commit is contained in:
@@ -64,13 +64,13 @@ describe('ol.interaction.Modify', function() {
|
||||
function simulateEvent(type, x, y, opt_shiftKey, button) {
|
||||
var viewport = map.getViewport();
|
||||
// calculated in case body has top < 0 (test runner with small window)
|
||||
var position = goog.style.getClientPosition(viewport);
|
||||
var position = viewport.getBoundingClientRect();
|
||||
var shiftKey = opt_shiftKey !== undefined ? opt_shiftKey : false;
|
||||
var pointerEvent = new ol.pointer.PointerEvent(type, {
|
||||
type: type,
|
||||
button: button,
|
||||
clientX: position.x + x + width / 2,
|
||||
clientY: position.y + y + height / 2,
|
||||
clientX: position.left + x + width / 2,
|
||||
clientY: position.top + y + height / 2,
|
||||
shiftKey: shiftKey
|
||||
});
|
||||
var event = new ol.MapBrowserPointerEvent(type, map, pointerEvent);
|
||||
@@ -377,7 +377,6 @@ describe('ol.interaction.Modify', function() {
|
||||
|
||||
goog.require('goog.dispose');
|
||||
goog.require('ol.events');
|
||||
goog.require('goog.style');
|
||||
goog.require('ol.Collection');
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.Map');
|
||||
|
||||
Reference in New Issue
Block a user