Merge pull request #7625 from fredj/named_export_control_interaction_defaults
Named export for ol/control and ol/interaction
This commit is contained in:
@@ -5,7 +5,7 @@ import _ol_Overlay_ from '../../../src/ol/Overlay.js';
|
||||
import _ol_View_ from '../../../src/ol/View.js';
|
||||
import Point from '../../../src/ol/geom/Point.js';
|
||||
import _ol_has_ from '../../../src/ol/has.js';
|
||||
import _ol_interaction_ from '../../../src/ol/interaction.js';
|
||||
import {defaults as defaultInteractions} from '../../../src/ol/interaction.js';
|
||||
import DoubleClickZoom from '../../../src/ol/interaction/DoubleClickZoom.js';
|
||||
import Interaction from '../../../src/ol/interaction/Interaction.js';
|
||||
import _ol_interaction_MouseWheelZoom_ from '../../../src/ol/interaction/MouseWheelZoom.js';
|
||||
@@ -480,7 +480,7 @@ describe('ol.Map', function() {
|
||||
describe('create mousewheel interaction', function() {
|
||||
it('creates mousewheel interaction', function() {
|
||||
options.mouseWheelZoom = true;
|
||||
var interactions = _ol_interaction_.defaults(options);
|
||||
var interactions = defaultInteractions(options);
|
||||
expect(interactions.getLength()).to.eql(1);
|
||||
expect(interactions.item(0)).to.be.a(_ol_interaction_MouseWheelZoom_);
|
||||
expect(interactions.item(0).constrainResolution_).to.eql(false);
|
||||
@@ -493,7 +493,7 @@ describe('ol.Map', function() {
|
||||
describe('create pinchZoom interaction', function() {
|
||||
it('creates pinchZoom interaction', function() {
|
||||
options.pinchZoom = true;
|
||||
var interactions = _ol_interaction_.defaults(options);
|
||||
var interactions = defaultInteractions(options);
|
||||
expect(interactions.getLength()).to.eql(1);
|
||||
expect(interactions.item(0)).to.be.a(_ol_interaction_PinchZoom_);
|
||||
expect(interactions.item(0).constrainResolution_).to.eql(false);
|
||||
@@ -505,7 +505,7 @@ describe('ol.Map', function() {
|
||||
options.pinchZoom = true;
|
||||
options.mouseWheelZoom = true;
|
||||
options.constrainResolution = true;
|
||||
var interactions = _ol_interaction_.defaults(options);
|
||||
var interactions = defaultInteractions(options);
|
||||
expect(interactions.getLength()).to.eql(2);
|
||||
expect(interactions.item(0)).to.be.a(_ol_interaction_PinchZoom_);
|
||||
expect(interactions.item(0).constrainResolution_).to.eql(true);
|
||||
@@ -522,7 +522,7 @@ describe('ol.Map', function() {
|
||||
|
||||
describe('default zoomDelta', function() {
|
||||
it('create double click interaction with default delta', function() {
|
||||
var interactions = _ol_interaction_.defaults(options);
|
||||
var interactions = defaultInteractions(options);
|
||||
expect(interactions.getLength()).to.eql(1);
|
||||
expect(interactions.item(0)).to.be.a(DoubleClickZoom);
|
||||
expect(interactions.item(0).delta_).to.eql(1);
|
||||
@@ -532,7 +532,7 @@ describe('ol.Map', function() {
|
||||
describe('set zoomDelta', function() {
|
||||
it('create double click interaction with set delta', function() {
|
||||
options.zoomDelta = 7;
|
||||
var interactions = _ol_interaction_.defaults(options);
|
||||
var interactions = defaultInteractions(options);
|
||||
expect(interactions.getLength()).to.eql(1);
|
||||
expect(interactions.item(0)).to.be.a(DoubleClickZoom);
|
||||
expect(interactions.item(0).delta_).to.eql(7);
|
||||
|
||||
Reference in New Issue
Block a user