feat: add editor#removeControl#266
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
PLS ADD |
oterral
reviewed
May 10, 2024
| * @private | ||
| */ | ||
| activeStateChange(ctrl) { | ||
| activeStateChange = (e) => { |
Contributor
There was a problem hiding this comment.
bind the function in constrcuto. I will make it on master after the merge
oterral
approved these changes
May 10, 2024
Contributor
oterral
left a comment
There was a problem hiding this comment.
Makes also sense, I will add the coding style after the merge and use this new function in the remove function of the editor.
oterral
reviewed
May 10, 2024
| * @param {ole.Control} control The control. | ||
| */ | ||
| removeControl(control) { | ||
| control.deactivate(true); |
Contributor
There was a problem hiding this comment.
Is there any reason to use the silent mode. I suppose you want that the listneer is triggered so other page elements can react of the deactivation ?
megawac
pushed a commit
to megawac/openlayers-editor
that referenced
this pull request
Jun 21, 2024
* github/master: (35 commits) chore: at least make sure the demo can draw a point chore: fix use of custom layer chore: fix demo chore: fix changelog chore(release): 2.4.2 chore(release): 2.4.2-beta.1 fix: listen only when possible chore(release): 2.4.2-beta.0 fix: unlisten only when possible chore(release): 2.4.1 fix: fix editor.remove and add a test chore: updates peer depedencies chore: updates readme chore: updates readme chore(release): 2.4.0 feat: add extentFilter property in CAD control test: add test for editor chore: we are not responsible of bad input of the user chore: we are not responsible of bad input of the user feat: add editor#removeControl (geops#266) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
editor#removeControlas an inverse to#addControl. This method will remove the control from the editor and map; it will also unregister all the events that will have been subscribed to.Others
IMPORTANT: Squash commits before or on merge to prevent every small commit being written into the change log. The Pull Request title will be written as message for the new commit containing the squashed commits and there fore needs to be in conventional-commit format