Rename _ol_events_Event_ to Event
This commit is contained in:
committed by
Frederic Junod
parent
9622c64bc6
commit
1cc682e488
@@ -10,7 +10,7 @@ import {inherits} from './index.js';
|
|||||||
import _ol_AssertionError_ from './AssertionError.js';
|
import _ol_AssertionError_ from './AssertionError.js';
|
||||||
import _ol_CollectionEventType_ from './CollectionEventType.js';
|
import _ol_CollectionEventType_ from './CollectionEventType.js';
|
||||||
import _ol_Object_ from './Object.js';
|
import _ol_Object_ from './Object.js';
|
||||||
import _ol_events_Event_ from './events/Event.js';
|
import Event from './events/Event.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
@@ -292,7 +292,7 @@ _ol_Collection_.Property_ = {
|
|||||||
*/
|
*/
|
||||||
_ol_Collection_.Event = function(type, opt_element) {
|
_ol_Collection_.Event = function(type, opt_element) {
|
||||||
|
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The element that is added to or removed from the collection.
|
* The element that is added to or removed from the collection.
|
||||||
@@ -302,6 +302,6 @@ _ol_Collection_.Event = function(type, opt_element) {
|
|||||||
this.element = opt_element;
|
this.element = opt_element;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(_ol_Collection_.Event, _ol_events_Event_);
|
inherits(_ol_Collection_.Event, Event);
|
||||||
|
|
||||||
export default _ol_Collection_;
|
export default _ol_Collection_;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @module ol/MapEvent
|
* @module ol/MapEvent
|
||||||
*/
|
*/
|
||||||
import {inherits} from './index.js';
|
import {inherits} from './index.js';
|
||||||
import _ol_events_Event_ from './events/Event.js';
|
import Event from './events/Event.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
@@ -18,7 +18,7 @@ import _ol_events_Event_ from './events/Event.js';
|
|||||||
*/
|
*/
|
||||||
var _ol_MapEvent_ = function(type, map, opt_frameState) {
|
var _ol_MapEvent_ = function(type, map, opt_frameState) {
|
||||||
|
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The map where the event occurred.
|
* The map where the event occurred.
|
||||||
@@ -36,5 +36,5 @@ var _ol_MapEvent_ = function(type, map, opt_frameState) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_MapEvent_, _ol_events_Event_);
|
inherits(_ol_MapEvent_, Event);
|
||||||
export default _ol_MapEvent_;
|
export default _ol_MapEvent_;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {getUid, inherits} from './index.js';
|
import {getUid, inherits} from './index.js';
|
||||||
import _ol_ObjectEventType_ from './ObjectEventType.js';
|
import _ol_ObjectEventType_ from './ObjectEventType.js';
|
||||||
import _ol_Observable_ from './Observable.js';
|
import _ol_Observable_ from './Observable.js';
|
||||||
import _ol_events_Event_ from './events/Event.js';
|
import Event from './events/Event.js';
|
||||||
import _ol_obj_ from './obj.js';
|
import _ol_obj_ from './obj.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -205,7 +205,7 @@ _ol_Object_.prototype.unset = function(key, opt_silent) {
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
_ol_Object_.Event = function(type, key, oldValue) {
|
_ol_Object_.Event = function(type, key, oldValue) {
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the property whose value is changing.
|
* The name of the property whose value is changing.
|
||||||
@@ -223,5 +223,5 @@ _ol_Object_.Event = function(type, key, oldValue) {
|
|||||||
this.oldValue = oldValue;
|
this.oldValue = oldValue;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(_ol_Object_.Event, _ol_events_Event_);
|
inherits(_ol_Object_.Event, Event);
|
||||||
export default _ol_Object_;
|
export default _ol_Object_;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import _ol_ViewHint_ from './ViewHint.js';
|
|||||||
import _ol_asserts_ from './asserts.js';
|
import _ol_asserts_ from './asserts.js';
|
||||||
import {removeNode} from './dom.js';
|
import {removeNode} from './dom.js';
|
||||||
import _ol_events_ from './events.js';
|
import _ol_events_ from './events.js';
|
||||||
import _ol_events_Event_ from './events/Event.js';
|
import Event from './events/Event.js';
|
||||||
import _ol_events_EventType_ from './events/EventType.js';
|
import _ol_events_EventType_ from './events/EventType.js';
|
||||||
import {createEmpty, clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty} from './extent.js';
|
import {createEmpty, clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty} from './extent.js';
|
||||||
import {TRUE} from './functions.js';
|
import {TRUE} from './functions.js';
|
||||||
@@ -179,7 +179,7 @@ var _ol_PluggableMap_ = function(options) {
|
|||||||
];
|
];
|
||||||
for (var i = 0, ii = overlayEvents.length; i < ii; ++i) {
|
for (var i = 0, ii = overlayEvents.length; i < ii; ++i) {
|
||||||
_ol_events_.listen(this.overlayContainerStopEvent_, overlayEvents[i],
|
_ol_events_.listen(this.overlayContainerStopEvent_, overlayEvents[i],
|
||||||
_ol_events_Event_.stopPropagation);
|
Event.stopPropagation);
|
||||||
}
|
}
|
||||||
this.viewport_.appendChild(this.overlayContainerStopEvent_);
|
this.viewport_.appendChild(this.overlayContainerStopEvent_);
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import Control from '../control/Control.js';
|
|||||||
import _ol_css_ from '../css.js';
|
import _ol_css_ from '../css.js';
|
||||||
import {easeOut} from '../easing.js';
|
import {easeOut} from '../easing.js';
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import _ol_events_EventType_ from '../events/EventType.js';
|
import _ol_events_EventType_ from '../events/EventType.js';
|
||||||
import _ol_math_ from '../math.js';
|
import _ol_math_ from '../math.js';
|
||||||
import _ol_pointer_EventType_ from '../pointer/EventType.js';
|
import _ol_pointer_EventType_ from '../pointer/EventType.js';
|
||||||
@@ -123,7 +123,7 @@ var ZoomSlider = function(opt_options) {
|
|||||||
_ol_events_.listen(containerElement, _ol_events_EventType_.CLICK,
|
_ol_events_.listen(containerElement, _ol_events_EventType_.CLICK,
|
||||||
this.handleContainerClick_, this);
|
this.handleContainerClick_, this);
|
||||||
_ol_events_.listen(thumbElement, _ol_events_EventType_.CLICK,
|
_ol_events_.listen(thumbElement, _ol_events_EventType_.CLICK,
|
||||||
_ol_events_Event_.stopPropagation);
|
Event.stopPropagation);
|
||||||
|
|
||||||
var render = options.render ? options.render : ZoomSlider.render;
|
var render = options.render ? options.render : ZoomSlider.render;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* @implements {oli.events.Event}
|
* @implements {oli.events.Event}
|
||||||
* @param {string} type Type.
|
* @param {string} type Type.
|
||||||
*/
|
*/
|
||||||
var _ol_events_Event_ = function(type) {
|
var Event = function(type) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
@@ -45,7 +45,7 @@ var _ol_events_Event_ = function(type) {
|
|||||||
* @override
|
* @override
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_events_Event_.prototype.preventDefault =
|
Event.prototype.preventDefault =
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop event propagation.
|
* Stop event propagation.
|
||||||
@@ -53,7 +53,7 @@ _ol_events_Event_.prototype.preventDefault =
|
|||||||
* @override
|
* @override
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_events_Event_.prototype.stopPropagation = function() {
|
Event.prototype.stopPropagation = function() {
|
||||||
this.propagationStopped = true;
|
this.propagationStopped = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ _ol_events_Event_.prototype.preventDefault =
|
|||||||
/**
|
/**
|
||||||
* @param {Event|ol.events.Event} evt Event
|
* @param {Event|ol.events.Event} evt Event
|
||||||
*/
|
*/
|
||||||
_ol_events_Event_.stopPropagation = function(evt) {
|
Event.stopPropagation = function(evt) {
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ _ol_events_Event_.stopPropagation = function(evt) {
|
|||||||
/**
|
/**
|
||||||
* @param {Event|ol.events.Event} evt Event
|
* @param {Event|ol.events.Event} evt Event
|
||||||
*/
|
*/
|
||||||
_ol_events_Event_.preventDefault = function(evt) {
|
Event.preventDefault = function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
};
|
};
|
||||||
export default _ol_events_Event_;
|
export default Event;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {inherits, nullFunction} from '../index.js';
|
import {inherits, nullFunction} from '../index.js';
|
||||||
import _ol_Disposable_ from '../Disposable.js';
|
import _ol_Disposable_ from '../Disposable.js';
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
@@ -74,7 +74,7 @@ _ol_events_EventTarget_.prototype.addEventListener = function(type, listener) {
|
|||||||
* event object or if any of the listeners returned false.
|
* event object or if any of the listeners returned false.
|
||||||
*/
|
*/
|
||||||
_ol_events_EventTarget_.prototype.dispatchEvent = function(event) {
|
_ol_events_EventTarget_.prototype.dispatchEvent = function(event) {
|
||||||
var evt = typeof event === 'string' ? new _ol_events_Event_(event) : event;
|
var evt = typeof event === 'string' ? new Event(event) : event;
|
||||||
var type = evt.type;
|
var type = evt.type;
|
||||||
evt.target = this;
|
evt.target = this;
|
||||||
var listeners = this.listeners_[type];
|
var listeners = this.listeners_[type];
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import {TRUE} from '../functions.js';
|
import {TRUE} from '../functions.js';
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import _ol_events_EventType_ from '../events/EventType.js';
|
import _ol_events_EventType_ from '../events/EventType.js';
|
||||||
import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
|
import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
|
||||||
import {get as getProjection} from '../proj.js';
|
import {get as getProjection} from '../proj.js';
|
||||||
@@ -253,7 +253,7 @@ _ol_interaction_DragAndDrop_.EventType_ = {
|
|||||||
*/
|
*/
|
||||||
_ol_interaction_DragAndDrop_.Event = function(type, file, opt_features, opt_projection) {
|
_ol_interaction_DragAndDrop_.Event = function(type, file, opt_features, opt_projection) {
|
||||||
|
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The features parsed from dropped data.
|
* The features parsed from dropped data.
|
||||||
@@ -277,5 +277,5 @@ _ol_interaction_DragAndDrop_.Event = function(type, file, opt_features, opt_proj
|
|||||||
this.projection = opt_projection;
|
this.projection = opt_projection;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(_ol_interaction_DragAndDrop_.Event, _ol_events_Event_);
|
inherits(_ol_interaction_DragAndDrop_.Event, Event);
|
||||||
export default _ol_interaction_DragAndDrop_;
|
export default _ol_interaction_DragAndDrop_;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @module ol/interaction/DragBox
|
* @module ol/interaction/DragBox
|
||||||
*/
|
*/
|
||||||
// FIXME draw drag box
|
// FIXME draw drag box
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import {inherits, nullFunction} from '../index.js';
|
import {inherits, nullFunction} from '../index.js';
|
||||||
import _ol_events_condition_ from '../events/condition.js';
|
import _ol_events_condition_ from '../events/condition.js';
|
||||||
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
||||||
@@ -213,7 +213,7 @@ _ol_interaction_DragBox_.EventType_ = {
|
|||||||
* @implements {oli.DragBoxEvent}
|
* @implements {oli.DragBoxEvent}
|
||||||
*/
|
*/
|
||||||
_ol_interaction_DragBox_.Event = function(type, coordinate, mapBrowserEvent) {
|
_ol_interaction_DragBox_.Event = function(type, coordinate, mapBrowserEvent) {
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The coordinate of the drag event.
|
* The coordinate of the drag event.
|
||||||
@@ -231,5 +231,5 @@ _ol_interaction_DragBox_.Event = function(type, coordinate, mapBrowserEvent) {
|
|||||||
this.mapBrowserEvent = mapBrowserEvent;
|
this.mapBrowserEvent = mapBrowserEvent;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(_ol_interaction_DragBox_.Event, _ol_events_Event_);
|
inherits(_ol_interaction_DragBox_.Event, Event);
|
||||||
export default _ol_interaction_DragBox_;
|
export default _ol_interaction_DragBox_;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import _ol_MapBrowserEventType_ from '../MapBrowserEventType.js';
|
|||||||
import _ol_Object_ from '../Object.js';
|
import _ol_Object_ from '../Object.js';
|
||||||
import _ol_coordinate_ from '../coordinate.js';
|
import _ol_coordinate_ from '../coordinate.js';
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import _ol_events_condition_ from '../events/condition.js';
|
import _ol_events_condition_ from '../events/condition.js';
|
||||||
import {boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../extent.js';
|
import {boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../extent.js';
|
||||||
import {TRUE, FALSE} from '../functions.js';
|
import {TRUE, FALSE} from '../functions.js';
|
||||||
@@ -889,7 +889,7 @@ _ol_interaction_Draw_.Mode_ = {
|
|||||||
*/
|
*/
|
||||||
_ol_interaction_Draw_.Event = function(type, feature) {
|
_ol_interaction_Draw_.Event = function(type, feature) {
|
||||||
|
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The feature being drawn.
|
* The feature being drawn.
|
||||||
@@ -899,5 +899,5 @@ _ol_interaction_Draw_.Event = function(type, feature) {
|
|||||||
this.feature = feature;
|
this.feature = feature;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(_ol_interaction_Draw_.Event, _ol_events_Event_);
|
inherits(_ol_interaction_Draw_.Event, Event);
|
||||||
export default _ol_interaction_Draw_;
|
export default _ol_interaction_Draw_;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import _ol_Feature_ from '../Feature.js';
|
|||||||
import _ol_MapBrowserEventType_ from '../MapBrowserEventType.js';
|
import _ol_MapBrowserEventType_ from '../MapBrowserEventType.js';
|
||||||
import _ol_MapBrowserPointerEvent_ from '../MapBrowserPointerEvent.js';
|
import _ol_MapBrowserPointerEvent_ from '../MapBrowserPointerEvent.js';
|
||||||
import _ol_coordinate_ from '../coordinate.js';
|
import _ol_coordinate_ from '../coordinate.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import {boundingExtent, getArea} from '../extent.js';
|
import {boundingExtent, getArea} from '../extent.js';
|
||||||
import GeometryType from '../geom/GeometryType.js';
|
import GeometryType from '../geom/GeometryType.js';
|
||||||
import Point from '../geom/Point.js';
|
import Point from '../geom/Point.js';
|
||||||
@@ -454,7 +454,7 @@ _ol_interaction_Extent_.prototype.setExtent = function(extent) {
|
|||||||
* @extends {ol.events.Event}
|
* @extends {ol.events.Event}
|
||||||
*/
|
*/
|
||||||
_ol_interaction_Extent_.Event = function(extent) {
|
_ol_interaction_Extent_.Event = function(extent) {
|
||||||
_ol_events_Event_.call(this, _ol_interaction_ExtentEventType_.EXTENTCHANGED);
|
Event.call(this, _ol_interaction_ExtentEventType_.EXTENTCHANGED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current extent.
|
* The current extent.
|
||||||
@@ -464,5 +464,5 @@ _ol_interaction_Extent_.Event = function(extent) {
|
|||||||
this.extent = extent;
|
this.extent = extent;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(_ol_interaction_Extent_.Event, _ol_events_Event_);
|
inherits(_ol_interaction_Extent_.Event, Event);
|
||||||
export default _ol_interaction_Extent_;
|
export default _ol_interaction_Extent_;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import _ol_MapBrowserPointerEvent_ from '../MapBrowserPointerEvent.js';
|
|||||||
import _ol_array_ from '../array.js';
|
import _ol_array_ from '../array.js';
|
||||||
import _ol_coordinate_ from '../coordinate.js';
|
import _ol_coordinate_ from '../coordinate.js';
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import _ol_events_EventType_ from '../events/EventType.js';
|
import _ol_events_EventType_ from '../events/EventType.js';
|
||||||
import _ol_events_condition_ from '../events/condition.js';
|
import _ol_events_condition_ from '../events/condition.js';
|
||||||
import {boundingExtent, buffer, createOrUpdateFromCoordinate} from '../extent.js';
|
import {boundingExtent, buffer, createOrUpdateFromCoordinate} from '../extent.js';
|
||||||
@@ -1215,7 +1215,7 @@ _ol_interaction_Modify_.getDefaultStyleFunction = function() {
|
|||||||
*/
|
*/
|
||||||
_ol_interaction_Modify_.Event = function(type, features, mapBrowserPointerEvent) {
|
_ol_interaction_Modify_.Event = function(type, features, mapBrowserPointerEvent) {
|
||||||
|
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The features being modified.
|
* The features being modified.
|
||||||
@@ -1231,5 +1231,5 @@ _ol_interaction_Modify_.Event = function(type, features, mapBrowserPointerEvent)
|
|||||||
*/
|
*/
|
||||||
this.mapBrowserEvent = mapBrowserPointerEvent;
|
this.mapBrowserEvent = mapBrowserPointerEvent;
|
||||||
};
|
};
|
||||||
inherits(_ol_interaction_Modify_.Event, _ol_events_Event_);
|
inherits(_ol_interaction_Modify_.Event, Event);
|
||||||
export default _ol_interaction_Modify_;
|
export default _ol_interaction_Modify_;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {getUid, inherits} from '../index.js';
|
|||||||
import _ol_CollectionEventType_ from '../CollectionEventType.js';
|
import _ol_CollectionEventType_ from '../CollectionEventType.js';
|
||||||
import _ol_array_ from '../array.js';
|
import _ol_array_ from '../array.js';
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import _ol_events_condition_ from '../events/condition.js';
|
import _ol_events_condition_ from '../events/condition.js';
|
||||||
import {TRUE} from '../functions.js';
|
import {TRUE} from '../functions.js';
|
||||||
import GeometryType from '../geom/GeometryType.js';
|
import GeometryType from '../geom/GeometryType.js';
|
||||||
@@ -391,7 +391,7 @@ _ol_interaction_Select_.prototype.removeFeatureLayerAssociation_ = function(feat
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
_ol_interaction_Select_.Event = function(type, selected, deselected, mapBrowserEvent) {
|
_ol_interaction_Select_.Event = function(type, selected, deselected, mapBrowserEvent) {
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selected features array.
|
* Selected features array.
|
||||||
@@ -414,7 +414,7 @@ _ol_interaction_Select_.Event = function(type, selected, deselected, mapBrowserE
|
|||||||
*/
|
*/
|
||||||
this.mapBrowserEvent = mapBrowserEvent;
|
this.mapBrowserEvent = mapBrowserEvent;
|
||||||
};
|
};
|
||||||
inherits(_ol_interaction_Select_.Event, _ol_events_Event_);
|
inherits(_ol_interaction_Select_.Event, Event);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
|
|||||||
import _ol_Collection_ from '../Collection.js';
|
import _ol_Collection_ from '../Collection.js';
|
||||||
import _ol_Object_ from '../Object.js';
|
import _ol_Object_ from '../Object.js';
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import {TRUE} from '../functions.js';
|
import {TRUE} from '../functions.js';
|
||||||
import _ol_array_ from '../array.js';
|
import _ol_array_ from '../array.js';
|
||||||
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
||||||
@@ -276,7 +276,7 @@ _ol_interaction_Translate_.prototype.updateState_ = function(oldMap) {
|
|||||||
*/
|
*/
|
||||||
_ol_interaction_Translate_.Event = function(type, features, coordinate) {
|
_ol_interaction_Translate_.Event = function(type, features, coordinate) {
|
||||||
|
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The features being translated.
|
* The features being translated.
|
||||||
@@ -293,5 +293,5 @@ _ol_interaction_Translate_.Event = function(type, features, coordinate) {
|
|||||||
*/
|
*/
|
||||||
this.coordinate = coordinate;
|
this.coordinate = coordinate;
|
||||||
};
|
};
|
||||||
inherits(_ol_interaction_Translate_.Event, _ol_events_Event_);
|
inherits(_ol_interaction_Translate_.Event, Event);
|
||||||
export default _ol_interaction_Translate_;
|
export default _ol_interaction_Translate_;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class for pointer events.
|
* A class for pointer events.
|
||||||
@@ -48,7 +48,7 @@ import _ol_events_Event_ from '../events/Event.js';
|
|||||||
* initial event properties.
|
* initial event properties.
|
||||||
*/
|
*/
|
||||||
var _ol_pointer_PointerEvent_ = function(type, originalEvent, opt_eventDict) {
|
var _ol_pointer_PointerEvent_ = function(type, originalEvent, opt_eventDict) {
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @const
|
* @const
|
||||||
@@ -192,7 +192,7 @@ var _ol_pointer_PointerEvent_ = function(type, originalEvent, opt_eventDict) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_pointer_PointerEvent_, _ol_events_Event_);
|
inherits(_ol_pointer_PointerEvent_, Event);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @module ol/render/Event
|
* @module ol/render/Event
|
||||||
*/
|
*/
|
||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
@@ -18,7 +18,7 @@ var _ol_render_Event_ = function(
|
|||||||
type, opt_vectorContext, opt_frameState, opt_context,
|
type, opt_vectorContext, opt_frameState, opt_context,
|
||||||
opt_glContext) {
|
opt_glContext) {
|
||||||
|
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For canvas, this is an instance of {@link ol.render.canvas.Immediate}.
|
* For canvas, this is an instance of {@link ol.render.canvas.Immediate}.
|
||||||
@@ -52,5 +52,5 @@ var _ol_render_Event_ = function(
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_render_Event_, _ol_events_Event_);
|
inherits(_ol_render_Event_, Event);
|
||||||
export default _ol_render_Event_;
|
export default _ol_render_Event_;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {ENABLE_RASTER_REPROJECTION} from '../reproj/common.js';
|
|||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import _ol_ImageState_ from '../ImageState.js';
|
import _ol_ImageState_ from '../ImageState.js';
|
||||||
import _ol_array_ from '../array.js';
|
import _ol_array_ from '../array.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import {equals} from '../extent.js';
|
import {equals} from '../extent.js';
|
||||||
import {equivalent} from '../proj.js';
|
import {equivalent} from '../proj.js';
|
||||||
import _ol_reproj_Image_ from '../reproj/Image.js';
|
import _ol_reproj_Image_ from '../reproj/Image.js';
|
||||||
@@ -188,7 +188,7 @@ _ol_source_Image_.defaultImageLoadFunction = function(image, src) {
|
|||||||
*/
|
*/
|
||||||
_ol_source_Image_.Event = function(type, image) {
|
_ol_source_Image_.Event = function(type, image) {
|
||||||
|
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The image related to the event.
|
* The image related to the event.
|
||||||
@@ -198,7 +198,7 @@ _ol_source_Image_.Event = function(type, image) {
|
|||||||
this.image = image;
|
this.image = image;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(_ol_source_Image_.Event, _ol_events_Event_);
|
inherits(_ol_source_Image_.Event, Event);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import _ol_ImageCanvas_ from '../ImageCanvas.js';
|
|||||||
import _ol_TileQueue_ from '../TileQueue.js';
|
import _ol_TileQueue_ from '../TileQueue.js';
|
||||||
import {createCanvasContext2D} from '../dom.js';
|
import {createCanvasContext2D} from '../dom.js';
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import _ol_events_EventType_ from '../events/EventType.js';
|
import _ol_events_EventType_ from '../events/EventType.js';
|
||||||
import {Processor as _ol_ext_pixelworks_Processor_} from 'pixelworks';
|
import {Processor as _ol_ext_pixelworks_Processor_} from 'pixelworks';
|
||||||
import {equals, getCenter, getHeight, getWidth} from '../extent.js';
|
import {equals, getCenter, getHeight, getWidth} from '../extent.js';
|
||||||
@@ -431,7 +431,7 @@ _ol_source_Raster_.createTileRenderer_ = function(source) {
|
|||||||
* @param {Object} data An object made available to operations.
|
* @param {Object} data An object made available to operations.
|
||||||
*/
|
*/
|
||||||
_ol_source_Raster_.Event = function(type, frameState, data) {
|
_ol_source_Raster_.Event = function(type, frameState, data) {
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The raster extent.
|
* The raster extent.
|
||||||
@@ -456,7 +456,7 @@ _ol_source_Raster_.Event = function(type, frameState, data) {
|
|||||||
this.data = data;
|
this.data = data;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(_ol_source_Raster_.Event, _ol_events_Event_);
|
inherits(_ol_source_Raster_.Event, Event);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {inherits, nullFunction} from '../index.js';
|
import {inherits, nullFunction} from '../index.js';
|
||||||
import _ol_TileCache_ from '../TileCache.js';
|
import _ol_TileCache_ from '../TileCache.js';
|
||||||
import _ol_TileState_ from '../TileState.js';
|
import _ol_TileState_ from '../TileState.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import {equivalent} from '../proj.js';
|
import {equivalent} from '../proj.js';
|
||||||
import _ol_size_ from '../size.js';
|
import _ol_size_ from '../size.js';
|
||||||
import _ol_source_Source_ from '../source/Source.js';
|
import _ol_source_Source_ from '../source/Source.js';
|
||||||
@@ -320,7 +320,7 @@ _ol_source_Tile_.prototype.useTile = nullFunction;
|
|||||||
*/
|
*/
|
||||||
_ol_source_Tile_.Event = function(type, tile) {
|
_ol_source_Tile_.Event = function(type, tile) {
|
||||||
|
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The tile related to the event.
|
* The tile related to the event.
|
||||||
@@ -330,5 +330,5 @@ _ol_source_Tile_.Event = function(type, tile) {
|
|||||||
this.tile = tile;
|
this.tile = tile;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(_ol_source_Tile_.Event, _ol_events_Event_);
|
inherits(_ol_source_Tile_.Event, Event);
|
||||||
export default _ol_source_Tile_;
|
export default _ol_source_Tile_;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import _ol_ObjectEventType_ from '../ObjectEventType.js';
|
|||||||
import _ol_array_ from '../array.js';
|
import _ol_array_ from '../array.js';
|
||||||
import _ol_asserts_ from '../asserts.js';
|
import _ol_asserts_ from '../asserts.js';
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import _ol_events_Event_ from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import _ol_events_EventType_ from '../events/EventType.js';
|
import _ol_events_EventType_ from '../events/EventType.js';
|
||||||
import {containsExtent, equals} from '../extent.js';
|
import {containsExtent, equals} from '../extent.js';
|
||||||
import _ol_featureloader_ from '../featureloader.js';
|
import _ol_featureloader_ from '../featureloader.js';
|
||||||
@@ -866,7 +866,7 @@ _ol_source_Vector_.prototype.setLoader = function(loader) {
|
|||||||
*/
|
*/
|
||||||
_ol_source_Vector_.Event = function(type, opt_feature) {
|
_ol_source_Vector_.Event = function(type, opt_feature) {
|
||||||
|
|
||||||
_ol_events_Event_.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The feature being added or removed.
|
* The feature being added or removed.
|
||||||
@@ -876,5 +876,5 @@ _ol_source_Vector_.Event = function(type, opt_feature) {
|
|||||||
this.feature = opt_feature;
|
this.feature = opt_feature;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(_ol_source_Vector_.Event, _ol_events_Event_);
|
inherits(_ol_source_Vector_.Event, Event);
|
||||||
export default _ol_source_Vector_;
|
export default _ol_source_Vector_;
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
import _ol_events_Event_ from '../../../../src/ol/events/Event.js';
|
import Event from '../../../../src/ol/events/Event.js';
|
||||||
|
|
||||||
describe('ol.events.Event', function() {
|
describe('ol.events.Event', function() {
|
||||||
|
|
||||||
describe('constructor', function() {
|
describe('constructor', function() {
|
||||||
it('takes a type as argument', function() {
|
it('takes a type as argument', function() {
|
||||||
var event = new _ol_events_Event_('foo');
|
var event = new Event('foo');
|
||||||
expect(event.type).to.be('foo');
|
expect(event.type).to.be('foo');
|
||||||
});
|
});
|
||||||
it('does not set the propagationStopped flag', function() {
|
it('does not set the propagationStopped flag', function() {
|
||||||
var event = new _ol_events_Event_('foo');
|
var event = new Event('foo');
|
||||||
expect(event.propagationStopped).to.be(undefined);
|
expect(event.propagationStopped).to.be(undefined);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('#preventDefault', function() {
|
describe('#preventDefault', function() {
|
||||||
it('sets the propagationStopped flag', function() {
|
it('sets the propagationStopped flag', function() {
|
||||||
var event = new _ol_events_Event_('foo');
|
var event = new Event('foo');
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
expect(event.propagationStopped).to.be(true);
|
expect(event.propagationStopped).to.be(true);
|
||||||
});
|
});
|
||||||
it('is the same as #stopPropagation', function() {
|
it('is the same as #stopPropagation', function() {
|
||||||
var event = new _ol_events_Event_('foo');
|
var event = new Event('foo');
|
||||||
expect(event.stopPropagation).to.equal(event.preventDefault);
|
expect(event.stopPropagation).to.equal(event.preventDefault);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -30,7 +30,7 @@ describe('ol.events.Event', function() {
|
|||||||
var event = {
|
var event = {
|
||||||
preventDefault: sinon.spy()
|
preventDefault: sinon.spy()
|
||||||
};
|
};
|
||||||
_ol_events_Event_.preventDefault(event);
|
Event.preventDefault(event);
|
||||||
expect(event.preventDefault.called).to.be(true);
|
expect(event.preventDefault.called).to.be(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -40,7 +40,7 @@ describe('ol.events.Event', function() {
|
|||||||
var event = {
|
var event = {
|
||||||
stopPropagation: sinon.spy()
|
stopPropagation: sinon.spy()
|
||||||
};
|
};
|
||||||
_ol_events_Event_.stopPropagation(event);
|
Event.stopPropagation(event);
|
||||||
expect(event.stopPropagation.called).to.be(true);
|
expect(event.stopPropagation.called).to.be(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import _ol_Disposable_ from '../../../../src/ol/Disposable.js';
|
import _ol_Disposable_ from '../../../../src/ol/Disposable.js';
|
||||||
import _ol_events_ from '../../../../src/ol/events.js';
|
import _ol_events_ from '../../../../src/ol/events.js';
|
||||||
import _ol_events_Event_ from '../../../../src/ol/events/Event.js';
|
import Event from '../../../../src/ol/events/Event.js';
|
||||||
import _ol_events_EventTarget_ from '../../../../src/ol/events/EventTarget.js';
|
import _ol_events_EventTarget_ from '../../../../src/ol/events/EventTarget.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ describe('ol.events.EventTarget', function() {
|
|||||||
it('passes a default ol.events.Event object to listeners', function() {
|
it('passes a default ol.events.Event object to listeners', function() {
|
||||||
eventTarget.addEventListener('foo', spy1);
|
eventTarget.addEventListener('foo', spy1);
|
||||||
eventTarget.dispatchEvent('foo');
|
eventTarget.dispatchEvent('foo');
|
||||||
expect(events[0]).to.be.a(_ol_events_Event_);
|
expect(events[0]).to.be.a(Event);
|
||||||
expect(events[0].type).to.be('foo');
|
expect(events[0].type).to.be('foo');
|
||||||
expect(events[0].target).to.equal(eventTarget);
|
expect(events[0].target).to.equal(eventTarget);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {inherits} from '../../../../src/ol/index.js';
|
import {inherits} from '../../../../src/ol/index.js';
|
||||||
import _ol_View_ from '../../../../src/ol/View.js';
|
import _ol_View_ from '../../../../src/ol/View.js';
|
||||||
import _ol_events_Event_ from '../../../../src/ol/events/Event.js';
|
import Event from '../../../../src/ol/events/Event.js';
|
||||||
import _ol_events_EventTarget_ from '../../../../src/ol/events/EventTarget.js';
|
import _ol_events_EventTarget_ from '../../../../src/ol/events/EventTarget.js';
|
||||||
import _ol_format_GeoJSON_ from '../../../../src/ol/format/GeoJSON.js';
|
import _ol_format_GeoJSON_ from '../../../../src/ol/format/GeoJSON.js';
|
||||||
import _ol_interaction_DragAndDrop_ from '../../../../src/ol/interaction/DragAndDrop.js';
|
import _ol_interaction_DragAndDrop_ from '../../../../src/ol/interaction/DragAndDrop.js';
|
||||||
@@ -114,7 +114,7 @@ where('FileReader').describe('ol.interaction.DragAndDrop', function() {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
interaction.setMap(map);
|
interaction.setMap(map);
|
||||||
var event = new _ol_events_Event_();
|
var event = new Event();
|
||||||
event.dataTransfer = {};
|
event.dataTransfer = {};
|
||||||
event.type = 'dragenter';
|
event.type = 'dragenter';
|
||||||
viewport.dispatchEvent(event);
|
viewport.dispatchEvent(event);
|
||||||
@@ -149,7 +149,7 @@ where('FileReader').describe('ol.interaction.DragAndDrop', function() {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
var event = new _ol_events_Event_();
|
var event = new Event();
|
||||||
event.dataTransfer = {};
|
event.dataTransfer = {};
|
||||||
event.type = 'dragenter';
|
event.type = 'dragenter';
|
||||||
viewport.dispatchEvent(event);
|
viewport.dispatchEvent(event);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||||
import _ol_MapBrowserEvent_ from '../../../../src/ol/MapBrowserEvent.js';
|
import _ol_MapBrowserEvent_ from '../../../../src/ol/MapBrowserEvent.js';
|
||||||
import _ol_View_ from '../../../../src/ol/View.js';
|
import _ol_View_ from '../../../../src/ol/View.js';
|
||||||
import _ol_events_Event_ from '../../../../src/ol/events/Event.js';
|
import Event from '../../../../src/ol/events/Event.js';
|
||||||
import _ol_interaction_Interaction_ from '../../../../src/ol/interaction/Interaction.js';
|
import _ol_interaction_Interaction_ from '../../../../src/ol/interaction/Interaction.js';
|
||||||
describe('ol.interaction.KeyboardPan', function() {
|
describe('ol.interaction.KeyboardPan', function() {
|
||||||
var map;
|
var map;
|
||||||
@@ -27,7 +27,7 @@ describe('ol.interaction.KeyboardPan', function() {
|
|||||||
var event = new _ol_MapBrowserEvent_('keydown', map, {
|
var event = new _ol_MapBrowserEvent_('keydown', map, {
|
||||||
type: 'keydown',
|
type: 'keydown',
|
||||||
target: map.getTargetElement(),
|
target: map.getTargetElement(),
|
||||||
preventDefault: _ol_events_Event_.prototype.preventDefault
|
preventDefault: Event.prototype.preventDefault
|
||||||
});
|
});
|
||||||
event.originalEvent.keyCode = 40; // DOWN
|
event.originalEvent.keyCode = 40; // DOWN
|
||||||
map.handleMapBrowserEvent(event);
|
map.handleMapBrowserEvent(event);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||||
import _ol_MapBrowserEvent_ from '../../../../src/ol/MapBrowserEvent.js';
|
import _ol_MapBrowserEvent_ from '../../../../src/ol/MapBrowserEvent.js';
|
||||||
import _ol_View_ from '../../../../src/ol/View.js';
|
import _ol_View_ from '../../../../src/ol/View.js';
|
||||||
import _ol_events_Event_ from '../../../../src/ol/events/Event.js';
|
import Event from '../../../../src/ol/events/Event.js';
|
||||||
import _ol_interaction_Interaction_ from '../../../../src/ol/interaction/Interaction.js';
|
import _ol_interaction_Interaction_ from '../../../../src/ol/interaction/Interaction.js';
|
||||||
describe('ol.interaction.KeyboardZoom', function() {
|
describe('ol.interaction.KeyboardZoom', function() {
|
||||||
var map;
|
var map;
|
||||||
@@ -27,7 +27,7 @@ describe('ol.interaction.KeyboardZoom', function() {
|
|||||||
var event = new _ol_MapBrowserEvent_('keydown', map, {
|
var event = new _ol_MapBrowserEvent_('keydown', map, {
|
||||||
type: 'keydown',
|
type: 'keydown',
|
||||||
target: map.getTargetElement(),
|
target: map.getTargetElement(),
|
||||||
preventDefault: _ol_events_Event_.prototype.preventDefault
|
preventDefault: Event.prototype.preventDefault
|
||||||
});
|
});
|
||||||
event.originalEvent.charCode = '+'.charCodeAt(0);
|
event.originalEvent.charCode = '+'.charCodeAt(0);
|
||||||
map.handleMapBrowserEvent(event);
|
map.handleMapBrowserEvent(event);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||||
import _ol_MapBrowserEvent_ from '../../../../src/ol/MapBrowserEvent.js';
|
import _ol_MapBrowserEvent_ from '../../../../src/ol/MapBrowserEvent.js';
|
||||||
import _ol_View_ from '../../../../src/ol/View.js';
|
import _ol_View_ from '../../../../src/ol/View.js';
|
||||||
import _ol_events_Event_ from '../../../../src/ol/events/Event.js';
|
import Event from '../../../../src/ol/events/Event.js';
|
||||||
import _ol_has_ from '../../../../src/ol/has.js';
|
import _ol_has_ from '../../../../src/ol/has.js';
|
||||||
import _ol_interaction_Interaction_ from '../../../../src/ol/interaction/Interaction.js';
|
import _ol_interaction_Interaction_ from '../../../../src/ol/interaction/Interaction.js';
|
||||||
import _ol_interaction_MouseWheelZoom_ from '../../../../src/ol/interaction/MouseWheelZoom.js';
|
import _ol_interaction_MouseWheelZoom_ from '../../../../src/ol/interaction/MouseWheelZoom.js';
|
||||||
@@ -46,7 +46,7 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
|||||||
var event = new _ol_MapBrowserEvent_('mousewheel', map, {
|
var event = new _ol_MapBrowserEvent_('mousewheel', map, {
|
||||||
type: 'mousewheel',
|
type: 'mousewheel',
|
||||||
target: map.getViewport(),
|
target: map.getViewport(),
|
||||||
preventDefault: _ol_events_Event_.prototype.preventDefault
|
preventDefault: Event.prototype.preventDefault
|
||||||
});
|
});
|
||||||
map.handleMapBrowserEvent(event);
|
map.handleMapBrowserEvent(event);
|
||||||
clock.tick(50);
|
clock.tick(50);
|
||||||
@@ -75,7 +75,7 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
|||||||
deltaMode: WheelEvent.DOM_DELTA_PIXEL,
|
deltaMode: WheelEvent.DOM_DELTA_PIXEL,
|
||||||
deltaY: _ol_has_.DEVICE_PIXEL_RATIO,
|
deltaY: _ol_has_.DEVICE_PIXEL_RATIO,
|
||||||
target: map.getViewport(),
|
target: map.getViewport(),
|
||||||
preventDefault: _ol_events_Event_.prototype.preventDefault
|
preventDefault: Event.prototype.preventDefault
|
||||||
});
|
});
|
||||||
event.coordinate = [0, 0];
|
event.coordinate = [0, 0];
|
||||||
map.handleMapBrowserEvent(event);
|
map.handleMapBrowserEvent(event);
|
||||||
@@ -94,7 +94,7 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
|||||||
deltaMode: WheelEvent.DOM_DELTA_PIXEL,
|
deltaMode: WheelEvent.DOM_DELTA_PIXEL,
|
||||||
deltaY: 1,
|
deltaY: 1,
|
||||||
target: map.getViewport(),
|
target: map.getViewport(),
|
||||||
preventDefault: _ol_events_Event_.prototype.preventDefault
|
preventDefault: Event.prototype.preventDefault
|
||||||
});
|
});
|
||||||
event.coordinate = [0, 0];
|
event.coordinate = [0, 0];
|
||||||
map.handleMapBrowserEvent(event);
|
map.handleMapBrowserEvent(event);
|
||||||
@@ -120,7 +120,7 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
|||||||
deltaMode: WheelEvent.DOM_DELTA_LINE,
|
deltaMode: WheelEvent.DOM_DELTA_LINE,
|
||||||
deltaY: 3.714599609375,
|
deltaY: 3.714599609375,
|
||||||
target: map.getViewport(),
|
target: map.getViewport(),
|
||||||
preventDefault: _ol_events_Event_.prototype.preventDefault
|
preventDefault: Event.prototype.preventDefault
|
||||||
});
|
});
|
||||||
event.coordinate = [0, 0];
|
event.coordinate = [0, 0];
|
||||||
map.handleMapBrowserEvent(event);
|
map.handleMapBrowserEvent(event);
|
||||||
@@ -140,7 +140,7 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
|||||||
type: 'mousewheel',
|
type: 'mousewheel',
|
||||||
wheelDeltaY: -50,
|
wheelDeltaY: -50,
|
||||||
target: map.getViewport(),
|
target: map.getViewport(),
|
||||||
preventDefault: _ol_events_Event_.prototype.preventDefault
|
preventDefault: Event.prototype.preventDefault
|
||||||
});
|
});
|
||||||
event.coordinate = [0, 0];
|
event.coordinate = [0, 0];
|
||||||
map.handleMapBrowserEvent(event);
|
map.handleMapBrowserEvent(event);
|
||||||
@@ -160,7 +160,7 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
|||||||
type: 'mousewheel',
|
type: 'mousewheel',
|
||||||
wheelDeltaY: -120,
|
wheelDeltaY: -120,
|
||||||
target: map.getViewport(),
|
target: map.getViewport(),
|
||||||
preventDefault: _ol_events_Event_.prototype.preventDefault
|
preventDefault: Event.prototype.preventDefault
|
||||||
});
|
});
|
||||||
event.coordinate = [0, 0];
|
event.coordinate = [0, 0];
|
||||||
map.handleMapBrowserEvent(event);
|
map.handleMapBrowserEvent(event);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import _ol_events_ from '../../../../src/ol/events.js';
|
import _ol_events_ from '../../../../src/ol/events.js';
|
||||||
import _ol_events_Event_ from '../../../../src/ol/events/Event.js';
|
import Event from '../../../../src/ol/events/Event.js';
|
||||||
import _ol_events_EventTarget_ from '../../../../src/ol/events/EventTarget.js';
|
import _ol_events_EventTarget_ from '../../../../src/ol/events/EventTarget.js';
|
||||||
import _ol_has_ from '../../../../src/ol/has.js';
|
import _ol_has_ from '../../../../src/ol/has.js';
|
||||||
import _ol_obj_ from '../../../../src/ol/obj.js';
|
import _ol_obj_ from '../../../../src/ol/obj.js';
|
||||||
@@ -122,7 +122,7 @@ describe('ol.pointer.TouchSource', function() {
|
|||||||
function simulateTouchEvent(type, changedTouches, touches) {
|
function simulateTouchEvent(type, changedTouches, touches) {
|
||||||
touches = touches !== undefined ? touches : changedTouches;
|
touches = touches !== undefined ? touches : changedTouches;
|
||||||
|
|
||||||
var event = new _ol_events_Event_(type);
|
var event = new Event(type);
|
||||||
_ol_obj_.assign(event, {
|
_ol_obj_.assign(event, {
|
||||||
touches: touches,
|
touches: touches,
|
||||||
changedTouches: changedTouches
|
changedTouches: changedTouches
|
||||||
|
|||||||
Reference in New Issue
Block a user