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
Add contextual menu on feature click in gmf-drawfeature #1021
Conversation
d6cf905
to
9c8d1e5
Compare
@fgravin Ready for review. |
*/ | ||
this.menu_ = new ngeo.Menu({ | ||
actions: [{ | ||
cls: 'glyphicon glyphicon-move', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use Font Awesome or custom fonts
Looks good, but please could you use bootstrap styling for the overlay look. |
@fgravin for the Thoughts ? |
9c8d1e5
to
e5c0f7a
Compare
@fgravin I decided to include the "translate" interaction in this PR to have an additional menu item working. It's not yet completed, so you can put your review on hold, if you want. |
We should use bootstrap components and styles as much as possible instead of adding our own styles. The main goal behind this is to be able to customize the global styling, all in once. |
+1 |
53b23a4
to
f747d85
Compare
@fgravin Ready for review. |
f747d85
to
6fccad3
Compare
@@ -0,0 +1,279 @@ | |||
goog.provide('ngeo.interaction.Translate'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why transform
for the file name ?
When you click on the arrow icon for the translation, it pans the map. |
Looks good, keep going this way. |
In order to prevent the map from being "panned" while dragging the center feature, I created a PR in OL3 that fixes this: openlayers/openlayers#5228 It features the possibility to define the layers you want to use as filter for the |
e68e70e
to
73609b4
Compare
The PR in OL3 has been merged. Ready for final review. @pgiraud Would you please take care of finalizing the review ? The code itself has already been reviewed, but not the UI. Thanks. |
I'll be happy to review this once #1016 is merged and the current pull request is rebased. I want to see it working with visual selection. |
76b9a00
to
fd13dc9
Compare
@pgiraud Ready for review. The live example is up-to-date. |
fd13dc9
to
756883c
Compare
What is new since my last comment ? For me it was good ! Thanks |
Excellent. Thanks. What's new:
There's nothing much in terms of "code" to validate again. |
OK LG, is it ready to merge ? |
Yes. |
This PR introduces the
ngeo.Menu
overlay, which consists in a contextual menu configurable with any number of actions. When an action is clicked, it dispatches an event. It can be closed with a close button, or automatically closed when an action is clicked (optional).This PR also implements a
ngeo.Menu
in thegmf-drawfeature
directive that is shown when a feature is clicked with the following actions:Todo
Live example