Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ol.Interaction.Modify fixes #3395

Merged
merged 4 commits into from
Mar 25, 2015
Merged

Conversation

fperucic
Copy link
Contributor

bug fixes,
extended examples/modify-test.js with specific use cases

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.
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.
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.
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
@ahocevar
Copy link
Member

Thanks for this very solid work @fperucic. It looks like you haven't submitted a CLA yet. Once you have, we can merge this.

@ahocevar ahocevar changed the title Inteaction.modify fix ol.Interaction.Modify fixes Mar 25, 2015
@adube adube mentioned this pull request Mar 25, 2015
ahocevar added a commit to openlayers/cla that referenced this pull request Mar 25, 2015
Thanks @fperucic for openlayers/openlayers#3395 and any contributions you can make.
ahocevar added a commit that referenced this pull request Mar 25, 2015
@ahocevar ahocevar merged commit 683097d into openlayers:master Mar 25, 2015
fperucic added a commit to fperucic/ol3 that referenced this pull request Mar 25, 2015
fix snap for ol.interaction.Modify
* @param {ol.interaction.SegmentDataType} b
* @return {number}
*/
function sorter(a, b) { return a.index - b.index; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was removed recently.

@fperucic fperucic deleted the inteaction.modify-fix branch March 26, 2015 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants