From 77adbdfa7a92b33f5182dfa2bc34fe02e693c7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 19 Aug 2013 14:08:57 +0200 Subject: [PATCH] Use per-animation function modules Currently the animation functions share the same module, namely ol.animation. We do differently for ol.control.defaults and ol.interaction.defaults, with ol.control.defaults and ol.interaction.defaults module. This commit replaces the ol.animation module by four modules, one for each animation function. This makes things more consistent, and will make it possible to use the @exportFunction annotation for the exporting of the animation functions. --- examples/animation.js | 4 +++- src/ol/animation.js | 5 ++++- src/ol/control/zoomcontrol.js | 2 +- src/ol/control/zoomslidercontrol.js | 2 +- src/ol/interaction/interaction.js | 4 +++- src/ol/kinetic.js | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/examples/animation.js b/examples/animation.js index 80c68d4a59..6182f8b243 100644 --- a/examples/animation.js +++ b/examples/animation.js @@ -1,7 +1,9 @@ goog.require('ol.Map'); goog.require('ol.RendererHints'); goog.require('ol.View2D'); -goog.require('ol.animation'); +goog.require('ol.animation.bounce'); +goog.require('ol.animation.pan'); +goog.require('ol.animation.rotate'); goog.require('ol.easing'); goog.require('ol.layer.TileLayer'); goog.require('ol.proj'); diff --git a/src/ol/animation.js b/src/ol/animation.js index 3d67b58af8..1a17b97426 100644 --- a/src/ol/animation.js +++ b/src/ol/animation.js @@ -1,6 +1,9 @@ // FIXME works for View2D only -goog.provide('ol.animation'); +goog.provide('ol.animation.bounce'); +goog.provide('ol.animation.pan'); +goog.provide('ol.animation.rotate'); +goog.provide('ol.animation.zoom'); goog.require('ol.PreRenderFunction'); goog.require('ol.ViewHint'); diff --git a/src/ol/control/zoomcontrol.js b/src/ol/control/zoomcontrol.js index 88e80d6b98..33604f2474 100644 --- a/src/ol/control/zoomcontrol.js +++ b/src/ol/control/zoomcontrol.js @@ -6,7 +6,7 @@ goog.require('goog.dom'); goog.require('goog.dom.TagName'); goog.require('goog.events'); goog.require('goog.events.EventType'); -goog.require('ol.animation'); +goog.require('ol.animation.zoom'); goog.require('ol.control.Control'); goog.require('ol.css'); goog.require('ol.easing'); diff --git a/src/ol/control/zoomslidercontrol.js b/src/ol/control/zoomslidercontrol.js index f8d5c55bbf..d392d8286b 100644 --- a/src/ol/control/zoomslidercontrol.js +++ b/src/ol/control/zoomslidercontrol.js @@ -15,7 +15,7 @@ goog.require('goog.fx.Dragger.EventType'); goog.require('goog.math'); goog.require('goog.math.Rect'); goog.require('goog.style'); -goog.require('ol.animation'); +goog.require('ol.animation.zoom'); goog.require('ol.control.Control'); goog.require('ol.css'); goog.require('ol.easing'); diff --git a/src/ol/interaction/interaction.js b/src/ol/interaction/interaction.js index 6fb94e17a7..4fe73093b4 100644 --- a/src/ol/interaction/interaction.js +++ b/src/ol/interaction/interaction.js @@ -3,7 +3,9 @@ goog.provide('ol.interaction.Interaction'); goog.require('ol.MapBrowserEvent'); -goog.require('ol.animation'); +goog.require('ol.animation.pan'); +goog.require('ol.animation.rotate'); +goog.require('ol.animation.zoom'); goog.require('ol.easing'); diff --git a/src/ol/kinetic.js b/src/ol/kinetic.js index 17e1e27d9c..1838b56db7 100644 --- a/src/ol/kinetic.js +++ b/src/ol/kinetic.js @@ -3,7 +3,7 @@ goog.provide('ol.Kinetic'); goog.require('ol.Coordinate'); goog.require('ol.PreRenderFunction'); -goog.require('ol.animation'); +goog.require('ol.animation.pan');