Commit Graph

71 Commits

Author SHA1 Message Date
Éric Lemoine 0bc8858760 Add a "features" option to ol.interaction.Select 2015-09-22 17:02:14 +02:00
Tim Schaub 6617bdd57f Drag zoom interaction tests 2015-09-09 10:49:08 -06:00
Éric Lemoine 95030cd838 Add ol.interaction.Draw#extend
This commit adds an `extend` method to the draw interaction. This method makes it possible to extend (continue drawing) an existing line string feature. It only works on line string features, where this functionality makes the most sense.

Here's an example on how to use `extend`:

```js
var vectorSource = vectorLayer.getSource();
vectroSource.removeFeature(feature);
drawInteraction.extend(feature);
```
2015-09-02 17:21:10 +02:00
Éric Lemoine 5f7e6ac61a Make Modify interaction listen to feature changes
This commit makes the Modify interaction modify its segment data when the candidate features change.
2015-08-18 16:39:49 +02:00
Christopher S. Case 338d0570fd Add a Translate interaction
This allows features to be moved around the map. It works much like the Modify interaction, however it's significantly simpler. It uses the geometry's underlying `translate` function.
2015-08-18 11:17:01 +02:00
Tim Schaub 571f3f30a4 Regression test for shared vertex deletion 2015-08-03 23:07:19 -06:00
Tim Schaub 405a8db075 Merge pull request #3946 from Turbo87/modify
Fix vertex deletion for Modify interaction on mobile devices.
2015-08-03 21:47:41 -06:00
Frederic Junod 2143eebd30 Fix drawstart and drawend events when drawing a point
The previous behavior was to fire a `drawstart` on the first `mousemove`.
2015-08-03 13:40:56 +02:00
Frederic Junod 3364dbb46e Remove count argument from called function
This function takes no arguments, use the `callCount` property instead.
2015-08-03 10:02:21 +02:00
Tobias Bieniek 7a34d22b37 interaction/modify: Add missing goog.require() to test 2015-08-01 22:09:32 +02:00
Tobias Bieniek 968c8aa34e interaction/modify: Replace lastNewVertexPixel with ignoreNextSingleClick
The previous approach did not work on mobile devices where no `pointermove`
event is sent except from dragging.

Logic now is: Upon vertex creation due to `pointerdown` we will ignore
the next `singleclick` event unless there is a `pointerdrag` event, which will
not lead to a `singleclick` event following the vertex creation.

Resolves #3935
2015-08-01 22:00:41 +02:00
Tobias Bieniek bf9156cbeb interaction/modify: Adjust simulated events
This is exactly matching the event sent by Chrome now
2015-08-01 21:03:18 +02:00
Tobias Bieniek bafd8548d1 interaction/modify: Add tests for deleteCondition option 2015-08-01 20:52:31 +02:00
Tobias Bieniek 22ca08179d interaction/modify: Use expect().to.be() assertion
... instead of expect(a === b).to.be.ok()
2015-08-01 20:20:06 +02:00
Björn Harrtell c69ba6a3dd Create vertex on boundary single click 2015-07-03 10:26:38 +02:00
Éric Lemoine b8cb1fe795 Merge pull request #3766 from elemoine/draw-click-tolerance
Add a clickTolerance option to the Draw interaction
2015-06-16 10:06:01 +02:00
Éric Lemoine e99f43af8d Add a clickTolerance option to the Draw interaction 2015-06-15 15:32:34 +02:00
Andreas Hocevar 53d5d8c1d9 Get rid of ol.FeatureOverlay
This also introduces a wrapX option to the Draw, Modify and Select
interaction.
2015-06-09 15:44:31 +02:00
Éric Lemoine 531b35d7c2 Be consistent with the way we name types 2015-05-21 17:32:32 +02:00
Andreas Hocevar 19c91235ce Add convenience function to create a regular polygon geometryFunction 2015-05-14 23:24:29 +02:00
Éric Lemoine 6d1baec34a Add missing goog.require 2015-04-29 09:10:18 +02:00
Andreas Hocevar 1d6530ce9c Merge pull request #3616 from ahocevar/freehand-drawing
Add support for freehand drawing to the Draw interaction
2015-04-27 11:27:10 +02:00
Tobias Sauerwein 8e4063d905 Merge pull request #3629 from tsauerwein/snap-xyz
Problems with XYZ coordinates in snap interaction
2015-04-27 08:53:34 +02:00
Björn Harrtell 11d378f36e Restore Modify interaction constructor test 2015-04-26 21:42:55 +02:00
Björn Harrtell ce3f7665c0 Initial tests for Modify interaction 2015-04-26 21:23:32 +02:00
tsauerwein 77f16c7fd6 Fix XYZ coordinates in snap interaction 2015-04-24 09:26:31 +02:00
Andreas Hocevar ed424eded8 Add support for freehand drawing to the Draw interaction 2015-04-22 17:45:55 +02:00
Guillaume Beraudo c0c7b71af6 Add draw interaction test case 2015-04-16 17:44:45 +02:00
Marc Jansen e283d6f54a Add basic test for ol.interaction.Snap 2015-04-13 21:13:27 +02:00
Marc Jansen 3e4d6f0b02 Add basic test for ol.interaction.DragRotateAndZoom 2015-04-13 21:13:27 +02:00
Marc Jansen 2609023a40 Add basic test for ol.interaction.DragAndDrop 2015-04-13 21:13:27 +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
Éric Lemoine f6461afdac Remove describe.only 2015-03-30 16:34:50 +02:00
Éric Lemoine f90308b504 Tests for the Select interaction's filter option 2015-03-30 13:35:00 +02:00
Éric Lemoine 2f417bbb28 Add empty lines for better code readability 2015-03-30 13:07:50 +02:00
Frederic Junod b7c4e4f297 Remove console.debug from selectinteraction tests 2015-03-24 14:42:30 +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
Björn Harrtell 49c2af165a Fix select event always reporting as multi select 2015-03-04 08:48:08 +01:00
Björn Harrtell d9cf8df052 Select interaction unit tests 2015-03-02 19:52:48 +01:00
Éric Lemoine 56b08adef7 Add goog.provide for ol.DrawEventType 2015-02-25 21:59:57 +01:00
Tim Schaub 3e3104bbb1 Avoid leaking global listenerSpy 2015-02-18 16:05:33 -07:00
Christopher S. Case b2ce4c19e1 added unit tests. 2015-02-18 09:50:10 -06:00
Éric Lemoine d07185e8f2 Add an "handleEvent" interaction option 2014-12-12 18:30:31 +01:00
Éric Lemoine 1a856599cb Add tests for ol.interaction.Draw#setMap 2014-09-30 10:00:53 +02:00
Éric Lemoine a31f8a9446 Add tests for ol.interaction.Draw#setActive 2014-09-30 10:00:53 +02:00
Éric Lemoine dede4f379f Make interaction "active" an ol.Object property 2014-09-29 17:31:58 +02:00
Tim Schaub 47d37fabea Rename ol.View2D to ol.View 2014-06-27 09:59:39 -04:00
tsauerwein d0e818e8ce Add condition to draw interaction 2014-06-06 15:54:38 +02:00
Bart van den Eijnden 945f5008f5 Ability to specify geometryName on ol.interaction.Draw 2014-05-14 08:35:27 +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