[WIP] Modify rectangle interaction #1043
Merged
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.
This commit adds the modify rectangle interaction, along with an example of how it works.
The interactions has two layers, one layers with the points which you can drag, and a second one with the polygon that represents the box.
A live example is available here:
http://adube.github.io/ngeo/modify-rectangle/examples/modifyrectangle.html
However, there is still missing a way of knowing you can interact with the rectangle, I was thinking of either a hover effect in the style, or a different cursor pointer, but I wanted to hear some opinions before taking action. With the modify circle, what was done is the point only appears when you hover the circle, but for the rectangles, I went with the spec, where we can see all four corners of the rectangle.
I see three solutions for this:
I'd appreciate some opinions, @fgravin ! You can check out the code if you want, above changes aren't going to be huge, I'd appreciate it just to make sure this is all on the right track.