rename map in tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import DragRotateAndZoom from '../../../../src/ol/interaction/DragRotateAndZoom.js';
|
||||
@@ -37,7 +37,7 @@ describe('ol.interaction.DragRotateAndZoom', function() {
|
||||
var source = new _ol_source_Vector_();
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
interaction = new DragRotateAndZoom();
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
interactions: [interaction],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import * as _ol_extent_ from '../../../../src/ol/extent.js';
|
||||
import {fromExtent as polygonFromExtent} from '../../../../src/ol/geom/Polygon.js';
|
||||
@@ -26,7 +26,7 @@ describe('ol.interaction.DragZoom', function() {
|
||||
document.body.appendChild(target);
|
||||
source = new _ol_source_Vector_();
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import {equals} from '../../../../src/ol/array.js';
|
||||
@@ -36,7 +36,7 @@ describe('ol.interaction.Draw', function() {
|
||||
document.body.appendChild(target);
|
||||
source = new _ol_source_Vector_();
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_interaction_Extent_ from '../../../../src/ol/interaction/Extent.js';
|
||||
@@ -13,7 +13,7 @@ describe('ol.interaction.Extent', function() {
|
||||
beforeEach(function() {
|
||||
var target = createMapDiv(width, height);
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import EventTarget from '../../../../src/ol/events/EventTarget.js';
|
||||
import Interaction from '../../../../src/ol/interaction/Interaction.js';
|
||||
@@ -26,7 +26,7 @@ describe('ol.interaction.Interaction', function() {
|
||||
describe('#getMap()', function() {
|
||||
|
||||
it('retrieves the associated map', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var interaction = new Interaction({});
|
||||
interaction.setMap(map);
|
||||
expect(interaction.getMap()).to.be(map);
|
||||
@@ -42,7 +42,7 @@ describe('ol.interaction.Interaction', function() {
|
||||
describe('#setMap()', function() {
|
||||
|
||||
it('allows a map to be set', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var interaction = new Interaction({});
|
||||
interaction.setMap(map);
|
||||
expect(interaction.getMap()).to.be(map);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import Event from '../../../../src/ol/events/Event.js';
|
||||
@@ -8,7 +8,7 @@ describe('ol.interaction.KeyboardPan', function() {
|
||||
var map;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: createMapDiv(100, 100),
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import Event from '../../../../src/ol/events/Event.js';
|
||||
@@ -8,7 +8,7 @@ describe('ol.interaction.KeyboardZoom', function() {
|
||||
var map;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: createMapDiv(100, 100),
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_events_ from '../../../../src/ol/events.js';
|
||||
@@ -47,7 +47,7 @@ describe('ol.interaction.Modify', function() {
|
||||
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import Event from '../../../../src/ol/events/Event.js';
|
||||
@@ -12,7 +12,7 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
interaction = new _ol_interaction_MouseWheelZoom_();
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: createMapDiv(100, 100),
|
||||
interactions: [interaction],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserEventType from '../../../../src/ol/MapBrowserEventType.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
@@ -59,7 +59,7 @@ describe('ol.interaction.Select', function() {
|
||||
|
||||
layer = new _ol_layer_Vector_({source: source});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import Circle from '../../../../src/ol/geom/Circle.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
@@ -36,7 +36,7 @@ describe('ol.interaction.Snap', function() {
|
||||
style.height = height + 'px';
|
||||
document.body.appendChild(target);
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
view: new _ol_View_({
|
||||
projection: 'EPSG:4326',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
@@ -34,7 +34,7 @@ describe('ol.interaction.Translate', function() {
|
||||
})];
|
||||
source.addFeatures(features);
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
view: new _ol_View_({
|
||||
|
||||
Reference in New Issue
Block a user