Tim Schaub
13a981c94b
Fewer blank lines
2016-01-11 22:03:23 -08:00
Tim Schaub
3cf8618fc7
Prefer single line assignment to 80 character limit
2016-01-11 18:56:08 -08:00
Tim Schaub
59a66c7aaa
Remaining valid-jsdoc corrections
2016-01-11 18:56:08 -08:00
Tim Schaub
fd0e2436da
Always provide a default case for switch
2016-01-11 18:56:08 -08:00
Tim Schaub
ec10b661f3
Use block scoping
2016-01-11 18:56:08 -08:00
Frederic Junod
5ead77bcd1
Remove extra space in type annotation
2015-11-19 10:03:42 +01:00
Andreas Hocevar
dc0c0877d7
Recover from bad merge conflict resolution in #4036
2015-10-08 15:18:11 +02:00
Andreas Hocevar
46a1140583
Merge pull request #4036 from alvinlindstam/fix-modify-events
...
Fix modify interaction event order
2015-10-08 12:17:57 +02:00
Frederic Junod
4d53049a7f
Remove unnecessary cast
2015-10-01 13:38:49 +02:00
Marc Jansen
a38ac3a07b
Use !!expr and not the verbose expr !== null
...
This addresses review comments by @tschaub.
2015-10-01 09:18:53 +02:00
Marc Jansen
be2e4a33ae
Remove goog.isNull in interaction classes
2015-10-01 09:17:14 +02:00
Tim Schaub
0927c55b3c
Toward natural JavaScript syntax
2015-09-25 12:16:42 -06:00
Marc Jansen
d610b206f7
Adjust checks against undefined as suggested
...
This commit changes the various checks against undefined as suggested by
@elemoine, see e.g. his comments on 38636513bfc3792125de2e711a24bd3c898875ac.
2015-09-25 11:37:30 -06:00
Marc Jansen
68442578ba
Use ol.isDef when checking booleans
2015-09-25 11:35:11 -06:00
Marc Jansen
0e4c73072f
Remove goog.isDef from modifyinteraction
2015-09-25 11:35:11 -06:00
Éric Lemoine
9894ceda2a
Remove bogus assertion
...
This commit removes an incorrect assertion from the modify interaction, which currently triggers when adding vertices to a line string. A new condition is added to the `if` statement to prevent a compilation error. In practice, `depth` and `segmentDataMatch.depth` are either both defined or both undefined.
2015-09-23 09:42:02 +02:00
Frederic Junod
ffc24e892e
Rename ol.ModifyEvent to ol.interaction.ModifyEvent
2015-08-25 09:26:10 +02:00
Frederic Junod
49b8f90e66
Add missing goog.provide
...
The new version of the closure-compiler (version 20150729) wants that all the classes
tagged with `@constructor` to be provided (with `goog.provide`).
2015-08-25 09:26:10 +02:00
Frederic Junod
eb4dab90e5
Better type for ol.interaction.Modify#rBush_
2015-08-25 09:26:10 +02:00
Alvin Lindstam
c5fe7df2e4
Fix modify event trigger order, should trigger modifystart before any modification and modifyend last.
2015-08-23 23:35:07 +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
Frederic Junod
0a6745f1e4
Remove unused goog.require
...
Found by the latest version of closure-compiler (v20150729)
2015-08-04 10:01:11 +02:00
Tim Schaub
85ddded15c
Only remove the vertex feature if it exists
...
When deleting a vertex shared by multiple features, we iterate through drag segments and only need to remove the vertex feature once.
2015-08-03 22:44:22 -06:00
Tobias Bieniek
c3f51c676a
interaction/modify: Fix identation issue
2015-08-01 22:05:44 +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
b001a48567
interaction/modify: Simplify lastNewVertexPixel condition
2015-08-01 21:12:59 +02:00
Peter Robins
c53aa7e8d5
Correct minor typo in modifyinteraction
2015-07-05 10:57:59 +01:00
Björn Harrtell
c69ba6a3dd
Create vertex on boundary single click
2015-07-03 10:26:38 +02:00
Björn Harrtell
f81e36d8e0
Add mapBrowserPointerEvent property to ModifyEvent
2015-07-03 10:11:24 +02:00
Björn Harrtell
f7d62f054c
High level Modify interaction events
2015-07-03 10:11:24 +02:00
Andreas Hocevar
f645a9e1e4
Make unmanaged vector layers behave more like ol.FeatureOverlay
...
* Skipped features need to be hit-detected on unmanaged layers.
* updateWhileAnimating and updateWhileInteracting are recommended to
achieve the same instant visual feedback that ol.FeatureOverlay had.
2015-06-19 13:06:29 +02:00
Andreas Hocevar
fad3cf9672
Merge pull request #3758 from ahocevar/remove-featureoverlay
...
Removal of ol.FeatureOverlay
2015-06-10 14:33:28 +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
Peter Robins
282fdafad7
Standardise draw/modify descriptions
2015-06-05 07:54:22 +00:00
Marc Jansen
73b103a19c
Add basic docs for modifyinteraction
2015-04-22 14:20:06 +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
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
Éric Lemoine
6b46d5c76a
Make shouldStopEvent default to the identity func
2014-12-18 14:13:44 +01:00
Éric Lemoine
711ec705b7
Add handle*Event options to ol.interaction.Pointer
...
More specifically: handleDownEvent, handleDragEvent, handleMoveEvent, and handleUpEvent.
2014-12-18 14:13:44 +01:00
Éric Lemoine
86561e5ef2
Merge pull request #3032 from elemoine/custom-components
...
Extension points for custom controls and interactions
2014-12-15 13:41:56 +01:00
Éric Lemoine
d07185e8f2
Add an "handleEvent" interaction option
2014-12-12 18:30:31 +01:00
Antoine Abt
e7db23761c
Respect geometry stride in modify interaction
2014-12-12 11:22:15 +01:00
Frederic Junod
a3b3e044f5
Remove unused distinctFeatures object in ol.interaction.Modify#handlePointerDown
...
The object is filled but never used.
2014-09-30 15:08:15 +02:00
Frederic Junod
aaeb2b6938
Remove unnecessary parentheses
2014-09-29 09:05:22 +02:00
Peter Robins
ed2f2befdf
Move createDefaultEditingStyles() to ol.style
2014-08-11 15:39:21 +00:00
Frederic Junod
0277026624
Stricter typing for ol.Collection
2014-07-30 09:38:16 +02:00