Remove unused map parameter from several interaction methods
This commit is contained in:
@@ -40,10 +40,10 @@ describe('ol.interaction.KeyboardPan', function() {
|
||||
map.handleMapBrowserEvent(event);
|
||||
event.originalEvent.keyCode = 39; // RIGHT
|
||||
map.handleMapBrowserEvent(event);
|
||||
expect(spy.getCall(0).args[2]).to.eql([0, -128]);
|
||||
expect(spy.getCall(1).args[2]).to.eql([0, 128]);
|
||||
expect(spy.getCall(2).args[2]).to.eql([-128, 0]);
|
||||
expect(spy.getCall(3).args[2]).to.eql([128, 0]);
|
||||
expect(spy.getCall(0).args[1]).to.eql([0, -128]);
|
||||
expect(spy.getCall(1).args[1]).to.eql([0, 128]);
|
||||
expect(spy.getCall(2).args[1]).to.eql([-128, 0]);
|
||||
expect(spy.getCall(3).args[1]).to.eql([128, 0]);
|
||||
ol.interaction.Interaction.pan.restore();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -36,8 +36,8 @@ describe('ol.interaction.KeyboardZoom', function() {
|
||||
map.handleMapBrowserEvent(event);
|
||||
event.originalEvent.charCode = '-'.charCodeAt(0);
|
||||
map.handleMapBrowserEvent(event);
|
||||
expect(spy.getCall(0).args[2]).to.eql(1);
|
||||
expect(spy.getCall(1).args[2]).to.eql(-1);
|
||||
expect(spy.getCall(0).args[1]).to.eql(1);
|
||||
expect(spy.getCall(1).args[1]).to.eql(-1);
|
||||
ol.interaction.Interaction.zoomByDelta.restore();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -106,8 +106,8 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
||||
it('works in DOM_DELTA_LINE mode (wheel)', function(done) {
|
||||
var spy = sinon.spy(ol.interaction.Interaction, 'zoomByDelta');
|
||||
map.once('postrender', function() {
|
||||
expect(spy.getCall(0).args[2]).to.be(-1);
|
||||
expect(spy.getCall(0).args[3]).to.eql([0, 0]);
|
||||
expect(spy.getCall(0).args[1]).to.be(-1);
|
||||
expect(spy.getCall(0).args[2]).to.eql([0, 0]);
|
||||
ol.interaction.Interaction.zoomByDelta.restore();
|
||||
done();
|
||||
});
|
||||
@@ -127,8 +127,8 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
||||
ol.has.SAFARI = true;
|
||||
var spy = sinon.spy(ol.interaction.Interaction, 'zoomByDelta');
|
||||
map.once('postrender', function() {
|
||||
expect(spy.getCall(0).args[2]).to.be(-1);
|
||||
expect(spy.getCall(0).args[3]).to.eql([0, 0]);
|
||||
expect(spy.getCall(0).args[1]).to.be(-1);
|
||||
expect(spy.getCall(0).args[2]).to.eql([0, 0]);
|
||||
ol.interaction.Interaction.zoomByDelta.restore();
|
||||
ol.has.SAFARI = origHasSafari;
|
||||
done();
|
||||
@@ -148,8 +148,8 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
||||
ol.has.SAFARI = false;
|
||||
var spy = sinon.spy(ol.interaction.Interaction, 'zoomByDelta');
|
||||
map.once('postrender', function() {
|
||||
expect(spy.getCall(0).args[2]).to.be(-1);
|
||||
expect(spy.getCall(0).args[3]).to.eql([0, 0]);
|
||||
expect(spy.getCall(0).args[1]).to.be(-1);
|
||||
expect(spy.getCall(0).args[2]).to.eql([0, 0]);
|
||||
ol.interaction.Interaction.zoomByDelta.restore();
|
||||
ol.has.SAFARI = origHasSafari;
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user