Commit Graph

3167 Commits

Author SHA1 Message Date
Éric Lemoine
0fa66cc7e7 Remove mousedown listener on first touchstart 2013-10-30 13:16:09 +01:00
Éric Lemoine
9f7ead5ef4 Remove unused ol.MapBrowserEventHandler#relayEvent_ func 2013-10-30 13:16:09 +01:00
Éric Lemoine
a85b82090d Emulate click events only on mouse "action"
`click` events are fired only if the mouse action button is pressed. This prevents `click` events from being fired when the middle mouse button is used.

Also, without this commit, in Chrome with emulated touch events enabled, double-clicking the map doesn't zoom the map. This is because `ol.BrowserFeature.HAS_TOUCH` is `false` in that environment. The commit fixes it by testing `isMouseActionButton` on mouse devices only.
2013-10-30 13:16:09 +01:00
Éric Lemoine
0c212fdcb5 Emulated click events on mouse devices
The map already emits emulated `click` and `dblclick` events on touch and pointer devices. With this commit the map emits emulated `click` and `dblclick` events on mouse devices as well.
2013-10-30 13:16:09 +01:00
Frederic Junod
a9159ecac3 Rename ol.interaction.condition to ol.events.condition 2013-10-30 12:13:44 +01:00
ahocevar
4b7b95fc2f Handle dragend after resetting view hint and dragging flag
When we start dragging, we first handle dragstart and then set
the INTERACTING view hint and the dragging flag. To end dragging
in a symmetric manner, we have to first reset the INTERACTING
hint and dragging flag, and then handle dragend.

This flaw becomes obvious when using an interaction where no
animation is performed after the interaction. This can be seen
in the style-rules example when using the dragzoom interaction
(i.e. zoom using a drag box): the vector renderer will not
render the new resolution, because the INTERACTING view hint is
still set when the zoom box dragend is handled.
2013-10-30 11:45:34 +01:00
Éric Lemoine
16b817b830 Overlay stopEvent and insertFirst default to true 2013-10-30 09:49:38 +01:00
Bruno Binet
d7c696fc76 Improve doc for stopEvent and insertFirst options 2013-10-30 09:28:56 +01:00
Bruno Binet
71097d9cfc Insert or append overlay based on insertFirst option
This is to fix z-index issues with overlays that pass above ol3 default
controls.
2013-10-30 09:28:25 +01:00
Bruno Binet
69cee6a410 Add insertFirst option in ol.OverlayOptions typedef 2013-10-30 09:28:25 +01:00
Frederic Junod
3efc810ca9 Quote values in apidoc 2013-10-29 11:01:49 +01:00
Frederic Junod
1217243f84 Better ol.coordinate.* documentation 2013-10-28 17:34:54 +01:00
Frederic Junod
9ca74200ed Remove opt_precision check in ol.coordinate.format
Default is already 0, see http://www.ecma-international.org/ecma-262/5.1/#sec-15.7.4.5
2013-10-28 16:26:21 +01:00
Frederic Junod
cdf34b558a Add ol.coordinate.format function
Return a formatted coordinate. Example usage:
  > ol.coordinate.format([0.01 ,12.14], "{x}, {y}", 2)
  "0.01, 12.14"
  > ol.coordinate.format([0.01 ,12.14], "lat: {y} / lon: {x}", 1)
  "lat: 12.1 / lon: 0.0"
2013-10-28 15:32:43 +01:00
Olivier Terral
cc3660f32a Fix getImageElement calls in canvas and webgl renderer 2013-10-28 14:04:40 +01:00
Tim Schaub
1529aad7f6 Merge pull request #1177 from probins/viewdocs
Small addition to view2d docs.
2013-10-27 11:39:44 -07:00
Peter Robins
e73fb871b6 Small addition to view2d docs 2013-10-27 05:53:46 -04:00
Éric Lemoine
d7636f266f Merge pull request #1147 from elemoine/issue-1147
IE 10 Click on popup
2013-10-27 02:09:25 -07:00
Tim Schaub
9d52e85fc3 Merge pull request #1163 from pagameba/doc-stability
Add default stability level to docs of exported things.
2013-10-25 11:40:16 -07:00
Peter Robins
d5df4bf80b Fix error in map docs
[ci skip]
2013-10-25 13:08:26 -04:00
Paul Spencer
bada596b45 Add default stability level to docs of exported things. 2013-10-24 18:20:24 -04:00
Frederic Junod
409d7d209d Export ol.extent.createEmpty function 2013-10-24 13:13:08 +02:00
Éric Lemoine
c17c21467e Merge pull request #1151 from probins/viewdocs
Some additions to View2d docs
2013-10-22 04:32:25 -07:00
Peter Robins
f5c6565617 Some additions to View2d docs
[ci skip]
2013-10-22 07:15:30 -04:00
Tim Schaub
e70b55b60b Check resources length of first resource set (see #1149) 2013-10-21 11:18:24 -06:00
Éric Lemoine
c065282243 Stop mspointer events
Stop mspointerup and mspointerdown events reaching the "stop event" overlay container.
2013-10-21 15:33:12 +02:00
Tom Payne
e4eff4658b Improve handling of error responses from Bing
Previously goog.asserts.assert was used to check that the response was
successful, which are stripped from compiled code.  This commit sets the
ERROR state on the source instead.
2013-10-21 12:02:55 +02:00
Peter Robins
a479193cf0 Add 'do not use' warning to view.setProjection
[ci skip]
2013-10-20 11:35:41 -04:00
Tom Payne
2a1bdf6b16 Add missing logo option 2013-10-18 15:56:05 +02:00
Tom Payne
228ff4e56b Add missing logo option 2013-10-18 14:23:16 +02:00
Éric Lemoine
1c890d837e Unconditonally set the framestate focus 2013-10-18 10:03:59 +02:00
Éric Lemoine
08bad9746b Do not relay mouseout events 2013-10-18 10:00:53 +02:00
Éric Lemoine
4c7f30c139 Make overlay container stop touchend and mouseup 2013-10-18 09:59:47 +02:00
Éric Lemoine
70eb5a5f13 Emulate click and dblclick on touch devices 2013-10-18 09:59:47 +02:00
Éric Lemoine
938f45a032 Do not relay mousemove events 2013-10-18 09:59:46 +02:00
Éric Lemoine
1c051aa055 Do not relay contextmenu events 2013-10-18 09:59:46 +02:00
Frédéric Junod
7e737f8b71 Merge pull request #1137 from fredj/dragbox_condition
Add new condition param to ol.control.DragBox
2013-10-17 23:48:34 -07:00
Frederic Junod
92acc3e2d9 Make sure that the event position is correct for touch events
This is a workaround for https://code.google.com/p/closure-library/issues/detail?id=588
2013-10-17 13:51:51 +02:00
Frederic Junod
ade9984872 Add new condition param to ol.control.DragBox 2013-10-17 07:44:05 +02:00
ahocevar
33f426fd85 Merge pull request #1135 from ahocevar/no-blur
Use integers when positioning on the target canvas
2013-10-16 09:03:08 -07:00
ahocevar
386fac2429 Use integers when positioning on the target canvas
This avoids blurred images after view center changes (dx, dy)
and at fractional zoom levels (dw, dh).
2013-10-16 16:39:45 +02:00
Tim Schaub
a8442df56a Merge pull request #1136 from pagameba/null-framestate-bug
Fix a bug when frameState is null which occurs in offline mobile devices.
2013-10-16 06:46:20 -07:00
Tim Schaub
3c5107b218 Merge pull request #1133 from tschaub/align-pixels
Ensure that pixels are aligned when rendering icons.
2013-10-16 06:37:46 -07:00
Paul Spencer
3173ddbb5f Fix a bug when frameState is null which occurs in offline mobile devices 2013-10-16 08:59:46 -04:00
Éric Lemoine
63c9aed620 Merge pull request #1077 from ThomasG77/setPositioning
Export ol.Overlay#setPositioning
2013-10-16 02:50:38 -07:00
Tim Schaub
b02f47a5a5 Align pixels when drawing icons or shapes
The floor before setting the transform ensures that we translate by integer pixels for odd and even dimenstions.  The round before drawing the image ensures pixels are aligned.
2013-10-15 22:12:12 -06:00
Tim Schaub
5fe7c20450 Merge pull request #1132 from tschaub/wide-stroke
Only call lineTo if we are in a new pixel.
2013-10-15 12:35:58 -07:00
Éric Lemoine
a5c6a865bf Merge pull request #1129 from elemoine/eventcoord
Add ol.Map#getEventPixel and ol.Map#getEventCoordinate
2013-10-15 04:03:07 -07:00
Éric Lemoine
69642f9a6d Export ol.Map#getViewport 2013-10-15 11:33:32 +02:00
Tim Schaub
2011e02364 Avoid calling lineTo on the same pixel for polygon stroke 2013-10-14 17:07:06 -06:00