Commit Graph

426 Commits

Author SHA1 Message Date
Frederic Junod
68773941d3 Use goog.array.contains instead of goog.array.indexOf 2014-04-26 08:31:40 +02:00
Éric Lemoine
f9c0f12f23 Remove skippeFeatures collection 2014-04-24 20:58:50 +02:00
Frederic Junod
ef27f14376 Remove undefined type from opt_target and opt_file 2014-04-14 12:01:48 +02:00
Frederic Junod
756f407ef4 Add file propery to ol.interaction.DragAndDropEvent 2014-04-14 10:47:57 +02:00
Tim Schaub
12840aa49f Merge pull request #1976 from tschaub/pointerup-return
Required return from event handler.
2014-04-10 06:52:13 -06:00
Antoine Abt
050f0cede6 Merge pull request #1974 from tonio/selectfeature
Automatically skip features on select’s collection changes
2014-04-10 14:41:52 +02:00
Tim Schaub
e72b383976 Required return from event handler 2014-04-10 06:32:27 -06:00
Antoine Abt
5147a0b060 Automatically skipFeatures on select’s collection changes 2014-04-10 14:24:39 +02:00
Frédéric Junod
c2bd829a5f Merge pull request #1975 from fredj/rotation-anchor
Rotate around arbitrary coordinate
2014-04-10 14:22:08 +02:00
Éric Lemoine
42adc23e86 Use ol.View2D#rotate in Interaction 2014-04-10 14:05:18 +02:00
Éric Lemoine
baca25ed95 Fix bug at modify interaction construction time
This fixes a bug that occurs when the modify interaction is configured with a non-empty collection of features.
2014-04-10 11:00:00 +02:00
Éric Lemoine
ce0b1d2a47 Use goog.functions.identity where it makes sense 2014-04-07 16:59:04 +02:00
Éric Lemoine
eac9b71b95 Set shouldStopEvent to identity in DragBox
This fixes a bug where the map is panned when boxes are drawn.
2014-04-07 16:57:02 +02:00
ahocevar
bf06129256 Initialize snappedToVertex_ 2014-04-04 14:11:02 +02:00
ahocevar
523b51d69a Add missing goog.requires; fix types and a typo 2014-04-04 14:05:19 +02:00
ahocevar
f2acbd332c Use the pixelTolerance to determine whether to snap to a vertex 2014-04-04 14:05:19 +02:00
ahocevar
8fc9b23ab8 Do not return as handled unless a geometry was modified
With this change, it is more straightforward to determine
whether an event is considered as handled, which results in the
removal of the modifiable_ and lastVertexCoordinate_ states.
Instead, we only need to know whether we're on a real vertex or
a virtual one. For that a new snappedToVertex_ flag is
introduced.

To stop a click after vertex deletion from triggering a feature
selection, vertex deletion is now triggered by a configurable
event condition, which defaults to singleclick (same as in the
select interaction) with no modifier keys.
2014-04-04 14:05:18 +02:00
ahocevar
8df95bc674 Handle skipped features when setting the map
When a Select interaction is removed from the map, it should
remove its selected features from the map's skippedFeatures
collection. When it is added to a map, it should add them.
2014-04-03 14:30:58 +02:00
Antoine Abt
ef546888c8 Merge pull request #1750 from tonio/default_editing_style
Share editing default styles
2014-03-31 11:03:35 +02:00
Antoine Abt
7122906214 Select interaction options are now optional 2014-03-31 10:24:17 +02:00
Antoine Abt
5cc1a986c2 Share editing default styles 2014-03-31 10:24:17 +02:00
Marc Jansen
8b538d765a Correct documentation for keyboardEventTarget. 2014-03-31 10:23:39 +02:00
Éric Lemoine
c82d5ba88e Make the Modify interaction more robust
This prevents a JavaScript error when features are added while the interaction does not have a map.
2014-03-28 16:09:52 +01:00
Éric Lemoine
afa5f35cef Create the R-Tree in the Modify constructor
In this way features can be added/removed to/from the R-Tree even when the interaction does not have a map.
2014-03-28 16:07:03 +01:00
Éric Lemoine
c33a3372d9 Fix initial state of the Modify interaction
Features that are in the features collection need to be added to the R-Tree.
2014-03-28 16:03:34 +01:00
Tom Payne
8545aa83a9 Merge pull request #1915 from twpayne/select-interaction
Restore select interaction behaviour
2014-03-28 14:07:26 +01:00
ahocevar
8b99fd9bc1 Updates to pass jshint validation 2014-03-28 12:02:08 +01:00
ahocevar
b9cd512ffc Lower pixel tolerance to avoid accidental vertex deltion 2014-03-28 11:37:06 +01:00
ahocevar
e612330dd7 Add a way to delete vertices with the Modify interaction
After this change, vertices can be deleted by simply clicking on
them. This is the same behaviour as e.g. in geojson.io.
2014-03-28 11:36:13 +01:00
Tom Payne
15efba8a23 Restore ol.interaction.Select options 2014-03-27 21:54:41 +01:00
Tom Payne
0ec6bc6325 Fix jsdoc 2014-03-27 21:54:40 +01:00
ahocevar
a3b5376520 Add missing event documentation and stability tags 2014-03-26 14:04:58 +01:00
Antoine Abt
4879f79094 Merge pull request #1877 from tonio/skip_features
Replace renderGeometryFunction by skippedFeatures
2014-03-21 09:57:19 +01:00
Antoine Abt
6a4c2bccc5 Coding style 2014-03-20 13:08:10 +01:00
Frederic Junod
6af2d5ae47 Remove trailing newlines 2014-03-20 12:38:14 +01:00
Antoine Abt
0d87516135 Map stores skippedFeatures instead of layers 2014-03-19 17:24:58 +01:00
Antoine Abt
e91db0f9af Check for null layers (for postcompose hitdetection) 2014-03-19 12:33:48 +01:00
Antoine Abt
c8de4d908d Skip features in select interaction 2014-03-19 12:33:32 +01:00
ahocevar
878f7cc7c8 Do not update RTree while dragging vertices 2014-03-19 11:36:55 +01:00
Tom Payne
395f1222a1 Add remove and toggle options to ol.interaction.Select 2014-03-17 16:43:41 +01:00
ahocevar
6de1636507 Initialize lastPixel_ properly 2014-03-14 15:24:58 +01:00
tsauerwein
873d47d087 Remove not needed type cast 2014-03-14 10:16:27 +01:00
Éric Lemoine
d08ab1ea78 PinchZoom interaction sets/unsets interacting hint 2014-03-14 10:16:27 +01:00
Éric Lemoine
544ceaf9f9 PinchRotate interaction sets/unsets interacting hint 2014-03-14 10:16:27 +01:00
Éric Lemoine
b5339550b7 DragPan interaction sets/unsets interacting hint 2014-03-14 10:16:27 +01:00
Éric Lemoine
d1ef5b0f5b Remove view hint handling from pointer interaction 2014-03-14 10:16:27 +01:00
Éric Lemoine
35b31730b5 Change a property from private to protected 2014-03-14 10:16:27 +01:00
Éric Lemoine
b939ca24d7 Use a more explicit variable name 2014-03-14 10:16:27 +01:00
tsauerwein
5a358918e1 Rename interactions
The idea behind the naming scheme is that for example
for `DragRotate`, `Rotate` is the action and `Drag` the
gesture that issues the action.
2014-03-14 10:16:27 +01:00
tsauerwein
d6ca93e23c Adding missing return 2014-03-14 10:16:26 +01:00