Rename _ol_MapBrowserEvent_ to MapBrowserEvent

This commit is contained in:
Marc Jansen
2017-12-15 09:41:34 +01:00
committed by Frederic Junod
parent a01793d3af
commit 465c248572
6 changed files with 21 additions and 21 deletions

View File

@@ -18,7 +18,7 @@ import MapEvent from './MapEvent.js';
* @param {boolean=} opt_dragging Is the map currently being dragged?
* @param {?olx.FrameState=} opt_frameState Frame state.
*/
var _ol_MapBrowserEvent_ = function(type, map, browserEvent, opt_dragging,
var MapBrowserEvent = function(type, map, browserEvent, opt_dragging,
opt_frameState) {
MapEvent.call(this, type, map, opt_frameState);
@@ -56,7 +56,7 @@ var _ol_MapBrowserEvent_ = function(type, map, browserEvent, opt_dragging,
};
inherits(_ol_MapBrowserEvent_, MapEvent);
inherits(MapBrowserEvent, MapEvent);
/**
@@ -65,7 +65,7 @@ inherits(_ol_MapBrowserEvent_, MapEvent);
* @override
* @api
*/
_ol_MapBrowserEvent_.prototype.preventDefault = function() {
MapBrowserEvent.prototype.preventDefault = function() {
MapEvent.prototype.preventDefault.call(this);
this.originalEvent.preventDefault();
};
@@ -77,8 +77,8 @@ _ol_MapBrowserEvent_.prototype.preventDefault = function() {
* @override
* @api
*/
_ol_MapBrowserEvent_.prototype.stopPropagation = function() {
MapBrowserEvent.prototype.stopPropagation = function() {
MapEvent.prototype.stopPropagation.call(this);
this.originalEvent.stopPropagation();
};
export default _ol_MapBrowserEvent_;
export default MapBrowserEvent;

View File

@@ -2,7 +2,7 @@
* @module ol/MapBrowserPointerEvent
*/
import {inherits} from './index.js';
import _ol_MapBrowserEvent_ from './MapBrowserEvent.js';
import MapBrowserEvent from './MapBrowserEvent.js';
/**
* @constructor
@@ -16,7 +16,7 @@ import _ol_MapBrowserEvent_ from './MapBrowserEvent.js';
var _ol_MapBrowserPointerEvent_ = function(type, map, pointerEvent, opt_dragging,
opt_frameState) {
_ol_MapBrowserEvent_.call(this, type, map, pointerEvent.originalEvent, opt_dragging,
MapBrowserEvent.call(this, type, map, pointerEvent.originalEvent, opt_dragging,
opt_frameState);
/**
@@ -27,5 +27,5 @@ var _ol_MapBrowserPointerEvent_ = function(type, map, pointerEvent, opt_dragging
};
inherits(_ol_MapBrowserPointerEvent_, _ol_MapBrowserEvent_);
inherits(_ol_MapBrowserPointerEvent_, MapBrowserEvent);
export default _ol_MapBrowserPointerEvent_;

View File

@@ -4,7 +4,7 @@
import {getUid, inherits} from './index.js';
import _ol_Collection_ from './Collection.js';
import _ol_CollectionEventType_ from './CollectionEventType.js';
import _ol_MapBrowserEvent_ from './MapBrowserEvent.js';
import MapBrowserEvent from './MapBrowserEvent.js';
import _ol_MapBrowserEventHandler_ from './MapBrowserEventHandler.js';
import _ol_MapBrowserEventType_ from './MapBrowserEventType.js';
import MapEvent from './MapEvent.js';
@@ -837,7 +837,7 @@ _ol_PluggableMap_.prototype.getTilePriority = function(tile, tileSourceKey, tile
*/
_ol_PluggableMap_.prototype.handleBrowserEvent = function(browserEvent, opt_type) {
var type = opt_type || browserEvent.type;
var mapBrowserEvent = new _ol_MapBrowserEvent_(type, this, browserEvent);
var mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);
this.handleMapBrowserEvent(mapBrowserEvent);
};