Give each source file a unique name

This commit is contained in:
Tom Payne
2012-10-25 19:03:04 +02:00
parent af872e25c3
commit e5d39724c9
31 changed files with 0 additions and 0 deletions
@@ -0,0 +1,36 @@
goog.provide('ol.interaction.KeyboardZoom');
goog.require('goog.events.KeyCodes');
goog.require('goog.events.KeyHandler.EventType');
goog.require('ol.interaction.Interaction');
/**
* @constructor
* @extends {ol.interaction.Interaction}
*/
ol.interaction.KeyboardZoom = function() {
goog.base(this);
};
goog.inherits(ol.interaction.KeyboardZoom, ol.interaction.Interaction);
/**
* @inheritDoc
*/
ol.interaction.KeyboardZoom.prototype.handleMapBrowserEvent =
function(mapBrowserEvent) {
if (mapBrowserEvent.type == goog.events.KeyHandler.EventType.KEY) {
var keyEvent = /** @type {goog.events.KeyEvent} */
mapBrowserEvent.browserEvent;
var charCode = keyEvent.charCode;
if (charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0)) {
var map = mapBrowserEvent.map;
var delta = (charCode == '+'.charCodeAt(0)) ? 4 : -4;
map.zoom(delta);
keyEvent.preventDefault();
mapBrowserEvent.preventDefault();
}
}
};