Commit Graph

16 Commits

Author SHA1 Message Date
Éric Lemoine
c2a30f4ac4 Replace the navigation control by two controls, namely DragPan and MouseWheelZoom. DragPan is the map default drag control. MouseWheelZoom is the map default mouse wheel control. 2012-07-13 08:57:40 +02:00
ahocevar
3cc069186c Allow for using a different set of default behaviors.
The default behavior of dragging and wheel zooming feels specific to 2D maps. So I think it makes sense to introduce a special type of controls (ol.control.DefaultControl) that implement default behaviors. This change also re-introduces the Navigatin control, which is a container for the default behaviors that were previously defined in the map handlers. Maybe this control needs to be renamed to Navigatin2D in the future, and there could be a different Navigation control for 3D maps.
2012-07-12 20:51:47 +02:00
ahocevar
42c4c9d869 No need to pass the element to the constructor.
If MapHandler subclasses could live without a map, it would make sense to have a constructor with a target and an element. But because the target is always the map, and the handler need to know about the map for performing default behavior, we always assume the map's viewport as element.
2012-07-12 20:44:32 +02:00
ahocevar
f672303f0a New MapHandler base class; better API docs 2012-07-12 15:21:15 +02:00
ahocevar
1ad915b428 Shuffling resources; better variable names; better type declarations. 2012-07-12 13:43:47 +02:00
Éric Lemoine
dea307e53a typed objects for map events 2012-07-12 08:18:22 +02:00
Éric Lemoine
3936c62e77 drag handler constructor should call its parent 2012-07-11 17:46:57 +02:00
Éric Lemoine
be0f73fb11 better doc strings for the drag handler 2012-07-11 17:46:25 +02:00
Éric Lemoine
da11a8c34d add ol.ENABLE_DRAG_HANDLER and ol.ENABLE_MOUSEWHEEL_HANDLER @defines, and pass a an object to the handlers for sharing states 2012-07-11 17:43:42 +02:00
Éric Lemoine
357d08df99 the drag handler moves the map by default 2012-07-11 08:31:38 +02:00
Éric Lemoine
127a2c9606 [ol.handler.Drag] receive mousemove/touchmove events when dragstart and dragend only 2012-07-09 20:50:59 +02:00
Éric Lemoine
f2e0adc24f make the drag handler prevent page scrolling 2012-07-09 09:32:18 +02:00
Éric Lemoine
22e7dc67d6 add a @fileoverview to ol/handler/Drag.js 2012-07-05 14:02:13 +02:00
Éric Lemoine
2fcd76bd54 ol.handler.Drag no longer needs a disposeInternal method 2012-07-05 14:01:44 +02:00
Éric Lemoine
410d79faa1 rely on registerDisposable 2012-07-05 11:11:35 +02:00
Éric Lemoine
946cd33350 make ol.Map inherit from goog.EventTarget, and add an ol.handler.Drag 2012-07-05 11:11:35 +02:00