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

Make interactions activable and deactivable #2740

Merged
merged 2 commits into from
Sep 23, 2014
Merged

Make interactions activable and deactivable #2740

merged 2 commits into from
Sep 23, 2014

Conversation

elemoine
Copy link
Member

This PR adds ol.interaction.Interaction#setActive to make be able to activate and deactivate interactions. Inactive interactions are skipped by the map.

Fixes #2738.

@elemoine elemoine added the api label Sep 23, 2014
@elemoine elemoine added this to the v3.1.0 milestone Sep 23, 2014
@ahocevar
Copy link
Member

Looks good to me.

@elemoine
Copy link
Member Author

Thanks for the review.

@elemoine
Copy link
Member Author

Note that getActive and setActive are still marked as experimental for now.

elemoine pushed a commit that referenced this pull request Sep 23, 2014
Make interactions activable and deactivable
@elemoine elemoine merged commit 69877de into openlayers:master Sep 23, 2014
@elemoine elemoine deleted the setgetactive branch September 23, 2014 11:41
@elemoine
Copy link
Member Author

There is a problem when deactivating a draw interaction: the sketch feature is still drawn on the map. The draw interaction should take action when setActive is called. Similar problems may also exist for the select and modify interactions. I'll create new pull requests for the issues.

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.

Add setActive to ol.interaction.Interaction
2 participants