From d51cd1c3959c5fec6723d114c76c19dc93098f4a Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 24 Sep 2012 17:18:21 +0200 Subject: [PATCH] Interaction in ol.interaction namespace. --- src/ol/interaction/dblclickzoom.js | 6 +++--- src/ol/interaction/drag.js | 6 +++--- src/ol/interaction/interaction.js | 16 ++++++++-------- src/ol/interaction/keyboard.js | 6 +++--- src/ol/interaction/keyboardpan.js | 6 +++--- src/ol/interaction/keyboardzoom.js | 6 +++--- src/ol/interaction/mousewheelzoom.js | 4 ++-- src/ol/map.js | 4 ++-- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/ol/interaction/dblclickzoom.js b/src/ol/interaction/dblclickzoom.js index 89bad5955d..87ec2b9af1 100644 --- a/src/ol/interaction/dblclickzoom.js +++ b/src/ol/interaction/dblclickzoom.js @@ -1,7 +1,7 @@ goog.provide('ol.interaction.DblClickZoom'); goog.require('goog.events.EventType'); -goog.require('ol.Interaction'); +goog.require('ol.interaction.Interaction'); goog.require('ol.MapBrowserEvent'); goog.require('ol.interaction.Constraints'); @@ -9,13 +9,13 @@ goog.require('ol.interaction.Constraints'); /** * @constructor - * @extends {ol.Interaction} + * @extends {ol.interaction.Interaction} * @param {ol.interaction.Constraints} constraints Constraints. */ ol.interaction.DblClickZoom = function(constraints) { goog.base(this, constraints); }; -goog.inherits(ol.interaction.DblClickZoom, ol.Interaction); +goog.inherits(ol.interaction.DblClickZoom, ol.interaction.Interaction); /** diff --git a/src/ol/interaction/drag.js b/src/ol/interaction/drag.js index a7e57ea505..659d6ae715 100644 --- a/src/ol/interaction/drag.js +++ b/src/ol/interaction/drag.js @@ -5,7 +5,7 @@ goog.require('goog.asserts'); goog.require('goog.events.EventType'); goog.require('goog.functions'); goog.require('ol.Coordinate'); -goog.require('ol.Interaction'); +goog.require('ol.interaction.Interaction'); goog.require('ol.MapBrowserEvent'); goog.require('ol.interaction.Constraints'); @@ -13,7 +13,7 @@ goog.require('ol.interaction.Constraints'); /** * @constructor - * @extends {ol.Interaction} + * @extends {ol.interaction.Interaction} * @param {ol.interaction.Constraints} constraints Constraints. */ ol.interaction.Drag = function(constraints) { @@ -57,7 +57,7 @@ ol.interaction.Drag = function(constraints) { this.startCoordinate = null; }; -goog.inherits(ol.interaction.Drag, ol.Interaction); +goog.inherits(ol.interaction.Drag, ol.interaction.Interaction); /** diff --git a/src/ol/interaction/interaction.js b/src/ol/interaction/interaction.js index b148a63e82..dae8d04708 100644 --- a/src/ol/interaction/interaction.js +++ b/src/ol/interaction/interaction.js @@ -1,6 +1,6 @@ // FIXME factor out key precondition (shift et. al) -goog.provide('ol.Interaction'); +goog.provide('ol.interaction.Interaction'); goog.require('ol.MapBrowserEvent'); goog.require('ol.interaction.Constraints'); @@ -11,7 +11,7 @@ goog.require('ol.interaction.Constraints'); * @constructor * @param {ol.interaction.Constraints} constraints Constraints. */ -ol.Interaction = function(constraints) { +ol.interaction.Interaction = function(constraints) { /** * @protected @@ -26,7 +26,7 @@ ol.Interaction = function(constraints) { * @param {ol.Map} map Map. * @param {ol.Extent} extent Extent. */ -ol.Interaction.prototype.fitExtent = function(map, extent) { +ol.interaction.Interaction.prototype.fitExtent = function(map, extent) { var resolution = map.getResolutionForExtent(extent); resolution = this.constraints.resolution(resolution, 0); var center = extent.getCenter(); @@ -41,7 +41,7 @@ ol.Interaction.prototype.fitExtent = function(map, extent) { /** * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. */ -ol.Interaction.prototype.handleMapBrowserEvent = goog.abstractMethod; +ol.interaction.Interaction.prototype.handleMapBrowserEvent = goog.abstractMethod; /** @@ -49,7 +49,7 @@ ol.Interaction.prototype.handleMapBrowserEvent = goog.abstractMethod; * @param {ol.Coordinate} delta Delta. * @param {ol.Coordinate=} opt_anchor Anchor. */ -ol.Interaction.prototype.pan = function(map, delta, opt_anchor) { +ol.interaction.Interaction.prototype.pan = function(map, delta, opt_anchor) { var center = opt_anchor ? opt_anchor : map.getCenter(); var resolution = map.getResolution(); center = this.constraints.center(center, resolution, delta); @@ -63,7 +63,7 @@ ol.Interaction.prototype.pan = function(map, delta, opt_anchor) { * @param {number} delta Delta. * @param {ol.Coordinate=} opt_anchor Anchor. */ -ol.Interaction.prototype.rotate = function(map, rotation, delta, opt_anchor) { +ol.interaction.Interaction.prototype.rotate = function(map, rotation, delta, opt_anchor) { // FIXME handle rotation about anchor rotation = this.constraints.rotation(rotation, delta); map.setRotation(rotation); @@ -74,7 +74,7 @@ ol.Interaction.prototype.rotate = function(map, rotation, delta, opt_anchor) { * @param {ol.Map} map Map. * @param {number|undefined} resolution Resolution. */ -ol.Interaction.prototype.setResolution = function(map, resolution) { +ol.interaction.Interaction.prototype.setResolution = function(map, resolution) { resolution = this.constraints.resolution(resolution, 0); map.setResolution(resolution); }; @@ -86,7 +86,7 @@ ol.Interaction.prototype.setResolution = function(map, resolution) { * @param {number} delta Delta. * @param {ol.Coordinate=} opt_anchor Anchor. */ -ol.Interaction.prototype.zoom = function(map, resolution, delta, opt_anchor) { +ol.interaction.Interaction.prototype.zoom = function(map, resolution, delta, opt_anchor) { if (goog.isDefAndNotNull(opt_anchor)) { var anchor = opt_anchor; var mapCenter = /** @type {!ol.Coordinate} */ map.getCenter(); diff --git a/src/ol/interaction/keyboard.js b/src/ol/interaction/keyboard.js index ba21904668..399a8146ea 100644 --- a/src/ol/interaction/keyboard.js +++ b/src/ol/interaction/keyboard.js @@ -2,13 +2,13 @@ goog.provide('ol.interaction.Keyboard'); -goog.require('ol.Interaction'); +goog.require('ol.interaction.Interaction'); /** * @constructor - * @extends {ol.Interaction} + * @extends {ol.interaction.Interaction} */ ol.interaction.Keyboard = function() { @@ -21,7 +21,7 @@ ol.interaction.Keyboard = function() { this.charCodeCallbacks_ = {}; }; -goog.inherits(ol.interaction.Keyboard, ol.Interaction); +goog.inherits(ol.interaction.Keyboard, ol.interaction.Interaction); /** diff --git a/src/ol/interaction/keyboardpan.js b/src/ol/interaction/keyboardpan.js index 3d9b1efe7a..2fbd268e45 100644 --- a/src/ol/interaction/keyboardpan.js +++ b/src/ol/interaction/keyboardpan.js @@ -2,14 +2,14 @@ goog.provide('ol.interaction.KeyboardPan'); goog.require('goog.events.KeyCodes'); goog.require('goog.events.KeyHandler.EventType'); -goog.require('ol.Interaction'); +goog.require('ol.interaction.Interaction'); goog.require('ol.interaction.Constraints'); /** * @constructor - * @extends {ol.Interaction} + * @extends {ol.interaction.Interaction} * @param {ol.interaction.Constraints} constraints Constraints. * @param {number} pixelDelta Pixel delta. */ @@ -24,7 +24,7 @@ ol.interaction.KeyboardPan = function(constraints, pixelDelta) { this.pixelDelta_ = pixelDelta; }; -goog.inherits(ol.interaction.KeyboardPan, ol.Interaction); +goog.inherits(ol.interaction.KeyboardPan, ol.interaction.Interaction); /** diff --git a/src/ol/interaction/keyboardzoom.js b/src/ol/interaction/keyboardzoom.js index dd88f90729..9ac83a62be 100644 --- a/src/ol/interaction/keyboardzoom.js +++ b/src/ol/interaction/keyboardzoom.js @@ -2,20 +2,20 @@ goog.provide('ol.interaction.KeyboardZoom'); goog.require('goog.events.KeyCodes'); goog.require('goog.events.KeyHandler.EventType'); -goog.require('ol.Interaction'); +goog.require('ol.interaction.Interaction'); goog.require('ol.interaction.ResolutionConstraintType'); /** * @constructor - * @extends {ol.Interaction} + * @extends {ol.interaction.Interaction} * @param {ol.interaction.Constraints} constraints Constraints. */ ol.interaction.KeyboardZoom = function(constraints) { goog.base(this, constraints); }; -goog.inherits(ol.interaction.KeyboardZoom, ol.Interaction); +goog.inherits(ol.interaction.KeyboardZoom, ol.interaction.Interaction); /** diff --git a/src/ol/interaction/mousewheelzoom.js b/src/ol/interaction/mousewheelzoom.js index 23a92750d5..79ab2806b2 100644 --- a/src/ol/interaction/mousewheelzoom.js +++ b/src/ol/interaction/mousewheelzoom.js @@ -9,13 +9,13 @@ goog.require('ol.interaction.Constraints'); /** * @constructor - * @extends {ol.Interaction} + * @extends {ol.interaction.Interaction} * @param {ol.interaction.Constraints} constraints Constraints. */ ol.interaction.MouseWheelZoom = function(constraints) { goog.base(this, constraints); }; -goog.inherits(ol.interaction.MouseWheelZoom, ol.Interaction); +goog.inherits(ol.interaction.MouseWheelZoom, ol.interaction.Interaction); /** diff --git a/src/ol/map.js b/src/ol/map.js index cd438cb501..70cc70a212 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -31,7 +31,7 @@ goog.require('ol.Collection'); goog.require('ol.Color'); goog.require('ol.Coordinate'); goog.require('ol.Extent'); -goog.require('ol.Interaction'); +goog.require('ol.interaction.Interaction'); goog.require('ol.MapBrowserEvent'); goog.require('ol.Object'); goog.require('ol.Pixel'); @@ -494,7 +494,7 @@ ol.Map.prototype.handleBrowserEvent = function(browserEvent, opt_type) { var type = opt_type || browserEvent.type; var mapBrowserEvent = new ol.MapBrowserEvent(type, this, browserEvent); var interactions = this.getInteractions(); - var interactionsArray = /** @type {Array.} */ + var interactionsArray = /** @type {Array.} */ interactions.getArray(); goog.array.every(interactionsArray, function(interaction) { interaction.handleMapBrowserEvent(mapBrowserEvent);