Transformed

This commit is contained in:
Tim Schaub
2017-12-11 16:29:33 -07:00
parent 1cdb6a66f0
commit 7f47883c48
737 changed files with 22216 additions and 21609 deletions

View File

@@ -1,17 +1,15 @@
goog.require('ol.Map');
goog.require('ol.MapBrowserEvent');
goog.require('ol.View');
goog.require('ol.events.Event');
goog.require('ol.interaction.Interaction');
import _ol_Map_ from '../../../../src/ol/Map.js';
import _ol_MapBrowserEvent_ from '../../../../src/ol/MapBrowserEvent.js';
import _ol_View_ from '../../../../src/ol/View.js';
import _ol_events_Event_ from '../../../../src/ol/events/Event.js';
import _ol_interaction_Interaction_ from '../../../../src/ol/interaction/Interaction.js';
describe('ol.interaction.KeyboardPan', function() {
var map;
beforeEach(function() {
map = new ol.Map({
map = new _ol_Map_({
target: createMapDiv(100, 100),
view: new ol.View({
view: new _ol_View_({
center: [0, 0],
resolutions: [1],
zoom: 0
@@ -25,11 +23,11 @@ describe('ol.interaction.KeyboardPan', function() {
describe('handleEvent()', function() {
it('pans on arrow keys', function() {
var spy = sinon.spy(ol.interaction.Interaction, 'pan');
var event = new ol.MapBrowserEvent('keydown', map, {
var spy = sinon.spy(_ol_interaction_Interaction_, 'pan');
var event = new _ol_MapBrowserEvent_('keydown', map, {
type: 'keydown',
target: map.getTargetElement(),
preventDefault: ol.events.Event.prototype.preventDefault
preventDefault: _ol_events_Event_.prototype.preventDefault
});
event.originalEvent.keyCode = 40; // DOWN
map.handleMapBrowserEvent(event);
@@ -43,7 +41,7 @@ describe('ol.interaction.KeyboardPan', function() {
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();
_ol_interaction_Interaction_.pan.restore();
});
});