ScreenSelector enhancements#75
Open
wcmatthysen wants to merge 3 commits intoNASAWorldWind:masterfrom
wcmatthysen:screen-selector-enhanced
Open
ScreenSelector enhancements#75wcmatthysen wants to merge 3 commits intoNASAWorldWind:masterfrom wcmatthysen:screen-selector-enhanced
wcmatthysen wants to merge 3 commits intoNASAWorldWind:masterfrom
wcmatthysen:screen-selector-enhanced
Conversation
The SelectionHighlightController is a useful class that can be used in combination with the ScreenSelector class. Thus, changed the ScreenSelection example application by pulling out the SelectionHighlightController and moving it to the gov.nasa.worldwindx.examples.util package.
Modified the ScreenSelector class by introducing additional behaviour. Added two flags, namely autoEnable and autoDisable (with getter and setter methods) to allow for auto-arm and disarming of the selector based on whether the user Control or Shift clicks before dragging the mouse.
The ScreenSelector class should not fire a selection event when a single-click is done on the map. It should only fire events when clicking and dragging a rectangle. The reason for this is that the single-click events will not contain any objects if it originates from the ScreenSelector. This can cause odd behaviour in terms of selecting an object and then deselecting everything. Thus, single-click select events should only be generated by the WorldWind canvas itself.
Author
|
Oh, another thing: the default behavior of ScreenSelector stays the same for clients that are used to the manual arming / disarming. You get the new auto arm / disarm behavior only if you set the two flags (autoEnable and autoDisable) to true. |
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.
I made some modifications to the screen-selection classes:
You can test the ScreenSelection functionality by calling:
this.screenSelector.setAutoEnable(true);this.screenSelector.setAutoDisable(true);in the ScreenSelection example.