Commit Graph

563 Commits

Author SHA1 Message Date
Frederic Junod 1daf4628b7 Move ol.ROTATE_ANIMATION_DURATION const to a constructor option 2015-04-13 15:05:35 +02:00
Frederic Junod 2fcdc48d20 Move ol.DRAGZOOM_ANIMATION_DURATION const to a constructor option 2015-04-13 14:59:39 +02:00
Frederic Junod 3b4bc0be25 Move ol.KEYBOARD_PAN_DURATION const to a constructor option 2015-04-13 14:54:23 +02:00
Tim Schaub 0189e11931 Remove unconditionally exported methods 2015-04-07 08:35:47 -06:00
Frédéric Junod 4619cac9ce Merge pull request #3431 from fredj/cleanup
Better typing
2015-03-31 17:38:00 +02:00
Frederic Junod d138b2d1d5 Better typing 2015-03-31 14:32:23 +02:00
Éric Lemoine c993964d27 Merge pull request #3422 from elemoine/multi-filter
Fix Select behavior when multi is false
2015-03-31 14:16:32 +02:00
Pierre GIRAUD 4b453f5be6 Adding missing provide for SelectFilterFunction 2015-03-31 09:36:25 +02:00
Bart van den Eijnden 47ce127a10 Add assert messages for all assertions up until ol.renderer.vector. 2015-03-30 22:55:23 +02:00
Éric Lemoine 9022530bf9 Fix Select behavior when multi is false
This commit addresses https://github.com/openlayers/ol3/pull/3402#issuecomment-87701660.
2015-03-30 18:32:36 +02:00
Andreas Hocevar 9add762f63 Merge pull request #3417 from fperucic/ol.interaction.Snap-extentFix
ol.interaction.Snap extent fix
2015-03-30 16:08:57 +02:00
Fran Peručić 6343c0420d fix: prevent indexed extent from beeing overwitten
when using ol.source.Vector with snap, indexedFeaturesExtents_ is updated whenever source calls geometry#getExtent
2015-03-30 15:13:09 +02:00
Fran Peručić 60dbe93f7f fix: set pendingFeatures_ as object on init 2015-03-30 15:01:23 +02:00
Éric Lemoine 91d14a35bb Merge pull request #3402 from elemoine/selectfilter
Add "filter" option to Select interaction
2015-03-30 13:45:46 +02:00
acanimal 1f0c21ac60 Add "filter" option to Select interaction 2015-03-30 13:07:02 +02:00
Fran Peručić 4168cda453 add: listen for 'change:geometry'
Geometry index won't be updated correctly if feature geometry is changed using `feature.setGeometry(new_geometry)`
ol.interaction.Snap should listen for a 'change:geometry' event on ol.Feature
2015-03-29 18:55:08 +02:00
Fran Peručić 4b85f5737c replaced ol.Collection with Array 2015-03-29 10:57:44 +02:00
Alexandre Dubé d740640321 Fix type of source and features 2015-03-27 09:07:34 -04:00
Andreas Hocevar 056c3ad23e Add consistency for pointer event handlers
Now all are private static functions.
2015-03-27 08:58:28 -04:00
Alexandre Dubé b34d7ce6cc Fix - support ol.Collection only as features 2015-03-27 08:58:21 -04:00
Fran Peručić 42d2adb1cf fix: repeating sort function + js annotation
Sort function is now bind to this, and it uses a pixelCoordinate_ member.
ol.interaction.Snap.handleEvent is removed
js annotations are modified
2015-03-27 12:48:52 +01:00
Fran Peručić ebc18b4f68 fix: updateing geometry index
More than one features can be be changed while handlingDownUpSequence
exampe: ol.interaction.Modify supports simultaneous editing of multiple features

When a geometry changes old indexed segments are searched by the feature extend and removed. New ones are added.
Old feature extent sholud be used when removing the old indexed segments.
2015-03-26 23:49:29 +01:00
Fran Peručić 299647a957 remove unnecessary flag dragging_ 2015-03-26 22:36:38 +01:00
Alexandre Dubé 1a5d7b85d2 Add/remove features in setMap 2015-03-26 15:19:33 -04:00
Alexandre Dubé 5bffa99e83 Trivial - reorder methods & comment 2015-03-26 14:48:44 -04:00
Alexandre Dubé 49a3f0a0b7 Update geometry index inside Snap interaction 2015-03-26 12:24:54 -04:00
Alexandre Dubé d1c3dc51ad Fix Drag interaction, works with modify now 2015-03-26 08:36:24 -04:00
Alexandre Dubé d92917ac89 Fix Snap -> Interaction
This commit changes ol.Snap -> ol.interaction.Snap, which extends
ol.interaction.Pointer.  The 'pointerdown', 'pointermove' and
'pointerup' map browser events are hanlded to edit the pixel and
coordinate properties to make them 'snap' to the closest feature.
2015-03-25 15:10:41 -04:00
Frederic Junod 6a770f03b8 Move the compare function out of ol.interaction.Modify.handleDownEvent_ 2015-03-25 14:41:40 +01:00
Fran Peručić 56067d1cda Prevent unnecessary function calls
handlePointerMove_ doesn't need to be called when dragging.
handleDragEvent_ takes care of the event in that case.

in handleDragEvent_, createOrUpdateVertexFeature_ doesn't need to be called for each dragged segment. it can be called only once with current vertex.

fixes made to pass the build
2015-03-25 11:19:24 +01:00
Fran Peručić 279d1829bb fix: ol.interaction.Select conflict
Prevent vertexFeature_ from ol.interaction.Modify from being selected by ol.interaction.Select.
The bug occurs when an delete attempt fails. ex: clicikng on the first or last node of LineString,
or clicking a line segment between two nodes.
2015-03-25 10:52:29 +01:00
Fran Peručić eb6d61e6d1 fix: modifying the closed LineString
This commit fixes the bug that occurs when trying to modify
a closed LineString by clicking on the starting/ending node.

Such a closed line is added to the modify-test example.
2015-03-25 10:44:35 +01:00
Fran Peručić 7dff739bce Deleting a duplicate node
Fix a bug in ol.interaction.Modify when trying to delete nodes
on a geometry that has duplicate nodes. A bug occurs when
clicking on the duplicate node.
2015-03-25 10:34:36 +01:00
Frederic Junod 6a8b236d82 Remove unnecessary newlines 2015-03-24 14:41:40 +01:00
Éric Lemoine 80fa7e5ba1 Merge pull request #3237 from Morgul/ccase-circle-drawing
Add circles to Draw interaction.
2015-03-11 17:08:10 +01:00
Frédéric Junod 9951c88343 Merge pull request #3322 from fredj/drawinteraction-map.isDef
Remove unneeded map.isDef call
2015-03-09 09:01:05 +01:00
Andreas Hocevar d8150c5155 Add interface definition for ol.SelectEvent 2015-03-06 11:31:30 +01:00
Frederic Junod 0d979e37b8 Remove unneeded map.isDef call 2015-03-05 18:12:23 +01:00
Frederic Junod daf81b9c26 Remove unused goog.require 2015-03-05 18:11:19 +01:00
Björn Harrtell 49c2af165a Fix select event always reporting as multi select 2015-03-04 08:48:08 +01:00
Björn Harrtell e4b1d6e1de Add SelectEvent to Select interaction
Fixes
2015-03-03 12:22:01 +01:00
Alexandre Dubé d1185da6b1 Replace mouseMove event condition by pointerMove
The original browser event was used to catch the mousemove event,
but in IE the 'pointermove' event is returned instead. So, instead
of using the original event, we use the map browser event, which
is always 'pointermove'.
2015-02-27 12:14:13 -05:00
Éric Lemoine 56b08adef7 Add goog.provide for ol.DrawEventType 2015-02-25 21:59:57 +01:00
Christopher S. Case 15a4b7f4a6 Changed default radius to 0, instead of 1000.
(This was debugging code.)
2015-02-18 09:50:10 -06:00
Christopher S. Case ae8321ab30 Added circle drawing to draw interaction. 2015-02-18 09:50:02 -06:00
Frederic Junod 13f265b4e1 Select the uppermost feature 2015-02-10 09:59:09 +01:00
Frédéric Junod 456def67de Merge pull request #3209 from fredj/coding-style
Coding style fixes
2015-02-05 14:53:59 +01:00
Frederic Junod 078d3fb007 Add missing goog.require 2015-02-05 10:56:44 +01:00
Frederic Junod 65c2f7de5f Remove unused goog.require 2015-02-05 10:56:44 +01:00
Frederic Junod 8ec90a2045 Remove unnecessary newlines 2015-02-05 10:56:44 +01:00