Rename _ol_pointer_PointerEvent_ to PointerEvent
This commit is contained in:
@@ -4,7 +4,7 @@ import View from '../../../../src/ol/View.js';
|
||||
import DragRotateAndZoom from '../../../../src/ol/interaction/DragRotateAndZoom.js';
|
||||
import Interaction from '../../../../src/ol/interaction/Interaction.js';
|
||||
import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import PointerEvent from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import VectorSource from '../../../../src/ol/source/Vector.js';
|
||||
|
||||
describe('ol.interaction.DragRotateAndZoom', function() {
|
||||
@@ -59,7 +59,7 @@ describe('ol.interaction.DragRotateAndZoom', function() {
|
||||
|
||||
it('does not rotate when rotation is disabled on the view', function() {
|
||||
var event = new MapBrowserPointerEvent('pointermove', map,
|
||||
new _ol_pointer_PointerEvent_('pointermove', {clientX: 20, clientY: 10}, {pointerType: 'mouse'}),
|
||||
new PointerEvent('pointermove', {clientX: 20, clientY: 10}, {pointerType: 'mouse'}),
|
||||
true);
|
||||
interaction.lastAngle_ = Math.PI;
|
||||
var spy = sinon.spy(Interaction, 'rotateWithoutConstraints');
|
||||
@@ -73,7 +73,7 @@ describe('ol.interaction.DragRotateAndZoom', function() {
|
||||
enableRotation: false
|
||||
}));
|
||||
event = new MapBrowserPointerEvent('pointermove', map,
|
||||
new _ol_pointer_PointerEvent_('pointermove', {clientX: 24, clientY: 16}, {pointerType: 'mouse'}),
|
||||
new PointerEvent('pointermove', {clientX: 24, clientY: 16}, {pointerType: 'mouse'}),
|
||||
true);
|
||||
interaction.handleDragEvent_(event);
|
||||
expect(spy.callCount).to.be(1);
|
||||
|
||||
@@ -15,7 +15,7 @@ import Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||
import Draw from '../../../../src/ol/interaction/Draw.js';
|
||||
import Interaction from '../../../../src/ol/interaction/Interaction.js';
|
||||
import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import PointerEvent from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import VectorSource from '../../../../src/ol/source/Vector.js';
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ describe('ol.interaction.Draw', function() {
|
||||
// calculated in case body has top < 0 (test runner with small window)
|
||||
var position = viewport.getBoundingClientRect();
|
||||
var shiftKey = opt_shiftKey !== undefined ? opt_shiftKey : false;
|
||||
var event = new _ol_pointer_PointerEvent_(type, {
|
||||
var event = new PointerEvent(type, {
|
||||
clientX: position.left + x + width / 2,
|
||||
clientY: position.top + y + height / 2,
|
||||
shiftKey: shiftKey
|
||||
@@ -94,7 +94,7 @@ describe('ol.interaction.Draw', function() {
|
||||
freehand: true
|
||||
});
|
||||
|
||||
var event = new _ol_pointer_PointerEvent_('pointerdown', {
|
||||
var event = new PointerEvent('pointerdown', {
|
||||
clientX: 0,
|
||||
clientY: 0,
|
||||
shiftKey: false
|
||||
|
||||
@@ -2,7 +2,7 @@ import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import View from '../../../../src/ol/View.js';
|
||||
import ExtentInteraction from '../../../../src/ol/interaction/Extent.js';
|
||||
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import PointerEvent from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
|
||||
describe('ol.interaction.Extent', function() {
|
||||
var map, interaction;
|
||||
@@ -50,7 +50,7 @@ describe('ol.interaction.Extent', function() {
|
||||
// calculated in case body has top < 0 (test runner with small window)
|
||||
var position = viewport.getBoundingClientRect();
|
||||
var shiftKey = opt_shiftKey !== undefined ? opt_shiftKey : false;
|
||||
var pointerEvent = new _ol_pointer_PointerEvent_(type, {
|
||||
var pointerEvent = new PointerEvent(type, {
|
||||
type: type,
|
||||
button: button,
|
||||
clientX: position.left + x + width / 2,
|
||||
|
||||
@@ -11,7 +11,7 @@ import Point from '../../../../src/ol/geom/Point.js';
|
||||
import Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||
import Modify from '../../../../src/ol/interaction/Modify.js';
|
||||
import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import PointerEvent from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import VectorSource from '../../../../src/ol/source/Vector.js';
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var viewport = map.getViewport();
|
||||
// calculated in case body has top < 0 (test runner with small window)
|
||||
var position = viewport.getBoundingClientRect();
|
||||
var pointerEvent = new _ol_pointer_PointerEvent_(type, {
|
||||
var pointerEvent = new PointerEvent(type, {
|
||||
type: type,
|
||||
clientX: position.left + x + width / 2,
|
||||
clientY: position.top + y + height / 2,
|
||||
|
||||
@@ -8,7 +8,7 @@ import Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||
import Interaction from '../../../../src/ol/interaction/Interaction.js';
|
||||
import Select from '../../../../src/ol/interaction/Select.js';
|
||||
import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import PointerEvent from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import VectorSource from '../../../../src/ol/source/Vector.js';
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ describe('ol.interaction.Select', function() {
|
||||
// calculated in case body has top < 0 (test runner with small window)
|
||||
var position = viewport.getBoundingClientRect();
|
||||
var shiftKey = opt_shiftKey !== undefined ? opt_shiftKey : false;
|
||||
var event = new _ol_pointer_PointerEvent_(type, {
|
||||
var event = new PointerEvent(type, {
|
||||
clientX: position.left + x + width / 2,
|
||||
clientY: position.top + y + height / 2,
|
||||
shiftKey: shiftKey
|
||||
|
||||
@@ -7,7 +7,7 @@ import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_interaction_Translate_ from '../../../../src/ol/interaction/Translate.js';
|
||||
import Interaction from '../../../../src/ol/interaction/Interaction.js';
|
||||
import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import PointerEvent from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import VectorSource from '../../../../src/ol/source/Vector.js';
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ describe('ol.interaction.Translate', function() {
|
||||
var position = viewport.getBoundingClientRect();
|
||||
var shiftKey = opt_shiftKey !== undefined ? opt_shiftKey : false;
|
||||
var event = new MapBrowserPointerEvent(type, map,
|
||||
new _ol_pointer_PointerEvent_(type, {
|
||||
new PointerEvent(type, {
|
||||
clientX: position.left + x + width / 2,
|
||||
clientY: position.top + y + height / 2,
|
||||
shiftKey: shiftKey
|
||||
|
||||
Reference in New Issue
Block a user