ahocevar
1c07c38a70
Using minus sign instead of ndash.
2012-07-13 17:53:33 +02:00
Éric Lemoine
425b6c6652
Merge pull request #10 from elemoine/event
...
make ol.Map inherit from goog.events.EventTarget
2012-07-13 08:47:39 -07:00
Éric Lemoine
a365b0aaf3
improvements to the drag handler tests
2012-07-13 17:44:46 +02:00
Éric Lemoine
226480af90
fix mousewheel handler tests
2012-07-13 16:20:23 +02:00
Éric Lemoine
6fd5bb8647
fix drag handler tests
2012-07-13 16:20:07 +02:00
Éric Lemoine
1f62bd8cd6
fix typo in drag handler
2012-07-13 16:19:42 +02:00
Éric Lemoine
2b9df6442b
Revert "Allow for using a different set of default behaviors."
...
This reverts commit 3cc069186c .
2012-07-13 15:38:06 +02:00
Éric Lemoine
f34aa03109
Revert "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."
...
This reverts commit c2a30f4ac4 .
2012-07-13 15:37:39 +02:00
Éric Lemoine
dd5182c55c
remove trailing spaces in tests
2012-07-13 15:37:21 +02:00
É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
f4532f1548
Completing tests for map handlers.
2012-07-12 23:48:13 +02:00
ahocevar
ba986e536d
We decided to be explicit about bubble/capture.
2012-07-12 23:47:37 +02:00
ahocevar
8183164298
The underlying event will be needed frequently.
...
But there will also be events that don't have an underlying event, so we make it optional.
2012-07-12 23:47:16 +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
8206f11372
be more explicit when calling goog.events.listen and unlisten
2012-07-12 08:20:42 +02:00
Éric Lemoine
dea307e53a
typed objects for map events
2012-07-12 08:18:22 +02:00
Éric Lemoine
d4106f166d
remove reference to ol.control.Navigation from ol.export.js
2012-07-12 08:17:23 +02:00
Éric Lemoine
8801542744
add code comments to click and mousewheel handlers
2012-07-12 08:14:21 +02:00
Éric Lemoine
d517bdc5cd
use of goog.events.Event.stopPropagation instead of our own function
2012-07-12 07:35:14 +02:00
Éric Lemoine
a6b37ff83d
remove reference to ol.control.Navigation in ol.js
2012-07-11 18:00:40 +02:00
Éric Lemoine
c6b8a93394
add goog.require for ol.handler.Click in ol.js
2012-07-11 17:52:21 +02:00
Éric Lemoine
8194f05ce4
better doc strings for the mousewheel handler
2012-07-11 17:49:13 +02:00
Éric Lemoine
62aee1d7ea
remove unused function in the mousewheel handler
2012-07-11 17:48:48 +02:00
Éric Lemoine
d73531bf57
missing goog.require in the mousewheel handler
2012-07-11 17:47:16 +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
d73410a9b3
add a click handler
2012-07-11 17:45:32 +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
38f946d944
remove the navigation control and the event target hierarchy
2012-07-11 17:38:18 +02:00
Éric Lemoine
ae5cdc75b4
the mousewheel handler zooms the map by default
2012-07-11 17:35:50 +02:00
Éric Lemoine
357d08df99
the drag handler moves the map by default
2012-07-11 08:31:38 +02:00
Éric Lemoine
82b5a59647
remove ol.event entirely
2012-07-09 21:34:47 +02:00
Éric Lemoine
e4ff1a7574
ol.Tile inherits from goog.events.EventTarget
2012-07-09 21:33:08 +02:00
Éric Lemoine
f9cb029a74
ol.control.Zoom no longer require ol.event
2012-07-09 21:32:10 +02:00
Éric Lemoine
77b809bead
ol.control.Attribution no longer require ol.event
2012-07-09 21:31:56 +02:00
Éric Lemoine
a3387bc673
ol.Map requires ol.handler.MouseWheel
2012-07-09 21:11:13 +02:00
Éric Lemoine
04f87f8f73
ol.Map:destroy is back (api tests pass again)
2012-07-09 21:09:42 +02:00
Éric Lemoine
7c7cd08494
base tests for ol.handler.Drag and ol.handler.MouseWheel
2012-07-09 21:09:09 +02:00
Éric Lemoine
aebfb643ac
better type checking
2012-07-09 20:51:28 +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
32757f2cd5
Merge remote branch 'upstream/master' into event
2012-07-09 19:47:46 +02:00
Éric Lemoine
484d0f8d04
use goog.events.dispatchEvent
2012-07-09 09:33:53 +02:00
Éric Lemoine
1679a59835
reset the map DEFAULT_CONTROLS array
2012-07-09 09:33:32 +02:00
Éric Lemoine
406a2da466
do no export ol.Map.prototype.destroy, it is gone
2012-07-09 09:32:57 +02:00
Éric Lemoine
f2e0adc24f
make the drag handler prevent page scrolling
2012-07-09 09:32:18 +02:00
Éric Lemoine
bc72e2e444
ol.control.Attribution no longer relies on map.getEvents
2012-07-09 09:31:33 +02:00
Éric Lemoine
e0b53360d2
ol.Popup no longer relies on map.getEvents
2012-07-09 09:30:34 +02:00