[openstreetmap-website] Implemented right-click context menu (#1030)
danstowell
notifications at github.com
Sun Aug 9 18:40:36 UTC 2015
Here's a context menu implemented for the main map view. Fixes #251. I think a context-menu click is a nice way to interact with the (relatively new) directions and query-here tools.
The exact choice of items is a matter that can be debated, but that aside, I'd like to ask if this approach seems broadly acceptable.
Notes:
* The browser's built-in context menu remains accessible, by holding shift while right-clicking.
* The "Add note here" option adds it in not-quite the right place, unless you also merge #1028 in which case it works correctly.
* I haven't yet done the i18n - wanted to get dev feedback before I do that.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/1030
-- Commit Summary --
* Import leaflet.contextmenu source files
* Implement context menu with: directions, add note, describe, centre.
* Add "Query features" to context menu
* Allow users to get default contextmenu on shift-click
* Enable/disable some context-menu options conditional on zoom
* tidier code
-- File Changes --
M app/assets/javascripts/index.js (83)
A app/assets/javascripts/leaflet.contextmenu.js (7)
M app/assets/stylesheets/leaflet-all.scss (1)
A app/assets/stylesheets/leaflet.contextmenu.css (54)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/1030.patch
https://github.com/openstreetmap/openstreetmap-website/pull/1030.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1030
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20150809/aff201f7/attachment.html>
More information about the rails-dev
mailing list