Use originalEvent instead of browserEvent
This commit is contained in:
committed by
Andreas Hocevar
parent
c62e76ab67
commit
e48ab95735
@@ -154,21 +154,21 @@ ol.control.MousePosition.prototype.getProjection = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {Event} browserEvent Browser event.
|
||||
* @param {Event} event Browser event.
|
||||
* @protected
|
||||
*/
|
||||
ol.control.MousePosition.prototype.handleMouseMove = function(browserEvent) {
|
||||
ol.control.MousePosition.prototype.handleMouseMove = function(event) {
|
||||
var map = this.getMap();
|
||||
this.lastMouseMovePixel_ = map.getEventPixel(browserEvent);
|
||||
this.lastMouseMovePixel_ = map.getEventPixel(event);
|
||||
this.updateHTML_(this.lastMouseMovePixel_);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {Event} browserEvent Browser event.
|
||||
* @param {Event} event Browser event.
|
||||
* @protected
|
||||
*/
|
||||
ol.control.MousePosition.prototype.handleMouseOut = function(browserEvent) {
|
||||
ol.control.MousePosition.prototype.handleMouseOut = function(event) {
|
||||
this.updateHTML_(null);
|
||||
this.lastMouseMovePixel_ = null;
|
||||
};
|
||||
|
||||
@@ -214,10 +214,10 @@ ol.control.ZoomSlider.render = function(mapEvent) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {Event} browserEvent The browser event to handle.
|
||||
* @param {Event} event The browser event to handle.
|
||||
* @private
|
||||
*/
|
||||
ol.control.ZoomSlider.prototype.handleContainerClick_ = function(browserEvent) {
|
||||
ol.control.ZoomSlider.prototype.handleContainerClick_ = function(event) {
|
||||
var map = this.getMap();
|
||||
var view = map.getView();
|
||||
var currentResolution = view.getResolution();
|
||||
@@ -229,8 +229,8 @@ ol.control.ZoomSlider.prototype.handleContainerClick_ = function(browserEvent) {
|
||||
easing: ol.easing.easeOut
|
||||
}));
|
||||
var relativePosition = this.getRelativePosition_(
|
||||
browserEvent.offsetX - this.thumbSize_[0] / 2,
|
||||
browserEvent.offsetY - this.thumbSize_[1] / 2);
|
||||
event.offsetX - this.thumbSize_[0] / 2,
|
||||
event.offsetY - this.thumbSize_[1] / 2);
|
||||
var resolution = this.getResolutionForPosition_(relativePosition);
|
||||
view.setResolution(view.constrainResolution(resolution));
|
||||
};
|
||||
@@ -243,7 +243,7 @@ ol.control.ZoomSlider.prototype.handleContainerClick_ = function(browserEvent) {
|
||||
*/
|
||||
ol.control.ZoomSlider.prototype.handleDraggerStart_ = function(event) {
|
||||
if (!this.dragging_ &&
|
||||
event.browserEvent.target === this.element.firstElementChild) {
|
||||
event.originalEvent.target === this.element.firstElementChild) {
|
||||
this.getMap().getView().setHint(ol.ViewHint.INTERACTING, 1);
|
||||
this.previousX_ = event.clientX;
|
||||
this.previousY_ = event.clientY;
|
||||
|
||||
Reference in New Issue
Block a user