Commit Graph

22 Commits

Author SHA1 Message Date
Tom Payne
2bf7dc5568 ol.interaction.Interaction methods should take ol.IView2Ds, not ol.View2Ds 2013-12-13 18:04:48 +01:00
Tim Schaub
009f7b53a1 Make interactions event targets 2013-11-07 16:39:05 -07:00
Tim Schaub
7d2d68c011 Give interactions a reference to the map
This is in line with what we do for controls and overlays.  A follow-up change will add calls to `setMap` when interactions are added to a map.
2013-10-31 09:25:52 -06:00
Tom Payne
b533cad031 Only install animations if duration > 0 2013-10-08 14:35:04 +02:00
Tom Payne
92f7f14744 Constrain center in ol.interaction.Interaction.pan 2013-09-30 10:17:24 +02:00
Tim Schaub
8ca3f13bd2 Instead of providing animation functions, provide the namespace
This follows the convention in the Closure Library of providing either namespace objects (where the property starts with a lowercase letter), constructors (where the property starts with an uppercase letter), or enums (all uppercase properties, only one instance of this in the closure library).
2013-09-04 13:55:36 -06:00
Tim Schaub
dc76b81780 Rename addPreRenderFunction to beforeRender and remove the plural 2013-09-03 10:57:31 -06:00
ahocevar
9dfbfab648 Follow-up improvements for #897
* Interaction is no goog.Disposable any more.
* Permanent cleanup during selection instead of disposeInternal.
* Moved selectionLayers creation outside feature loop.
* Maintain selectedFeatures and unselectedFeatures only for
  layers that have a setRenderIntent method.
2013-08-30 16:26:49 +02:00
ahocevar
e2c4fec253 Let's at least be disposable, so we can clean up after ourselves 2013-08-30 12:00:06 +02:00
ahocevar
6bb23cdda5 No longer inheriting from EventTarget 2013-08-30 11:43:35 +02:00
ahocevar
100b85a7b0 Converting control to an interaction
To dispatch events, the interaction base class now inherits from
goog.events.EventTarget.
2013-08-29 16:50:53 +02:00
Éric Lemoine
77adbdfa7a 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.
2013-08-19 14:25:38 +02:00
Éric Lemoine
6fc4aa68b6 Remove ol.MapBrowserEvent#stopOtherInteractions
and check for false/true in the return from handleMapBrowserEvent. Refs #791.
2013-06-27 14:43:00 +02:00
Éric Lemoine
38914bc95b addPreRenderFunction calls requestRenderFrame
So there's no need to call requestRenderFrame prior to calling addPreRenderFunction.
2013-04-10 16:15:58 +02:00
Éric Lemoine
2d5381ae41 Move zoom from View2D to Interaction 2013-04-10 08:52:07 +02:00
Éric Lemoine
dbca68650c Move rotate from View2D to Interaction 2013-04-10 08:52:06 +02:00
Éric Lemoine
51094139a8 Move pan function from View2D to Interaction 2013-04-10 08:27:47 +02:00
Éric Lemoine
b6bb05bf76 Refactoring to set the constraints to the map 2012-09-27 00:09:29 +02:00
ahocevar
3bd204fb6a DragBox control provides visual shiftdragzoom feedback
Adding a new DragBox control and using it in the shiftdragzoom interaction to provide visual feedback of the zoom box. The control is nicely separated from the interaction - it only draws the box and does not perform any action.
2012-09-26 12:50:14 +02:00
Tom Payne
2d7a21eaa0 More gjslint fixes 2012-09-25 00:03:53 +02:00
Tim Schaub
d51cd1c395 Interaction in ol.interaction namespace. 2012-09-24 17:18:21 +02:00
Tom Payne
f8c31ba45c s/ol3/ol/ 2012-09-24 14:21:41 +02:00