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

[WIP] Modify rectangle interaction #1043

Merged
merged 8 commits into from Apr 20, 2016
Merged

Conversation

jlap
Copy link
Contributor

@jlap jlap commented Apr 19, 2016

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:

  • Changing the cursor on hover
  • Changing the style on hover
  • Only display the point on hover (like the modify circle)

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.

@fgravin
Copy link
Member

fgravin commented Apr 19, 2016

Ok very good.
For the style, the modify Interaction already has a style to display Vertices.
Best option is that the hover on vertices highligh the corner.

@jlap
Copy link
Contributor Author

jlap commented Apr 19, 2016

@fgravin
Copy link
Member

fgravin commented Apr 19, 2016

Very good.
I merge it, you'll work back on it if needed.
Please integrate it in drawFeature example, with the Vertex Style.
Thanks @jlap

@fgravin fgravin merged commit c3b12a2 into camptocamp:master Apr 20, 2016
@sbrunner sbrunner added this to the Older milestone Aug 23, 2019
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.

None yet

3 participants