[openstreetmap-website] Implemented right-click context menu (#1030)

danstowell notifications at github.com
Mon Oct 12 20:57:57 UTC 2015


Just checking up on this PR, I notice that Travis is raising a Javascript issue which is caused by my "tidy" decision to refactor the context-menu callbacks into a separate file:

```
% bundle exec rake jshint
app/assets/javascripts/index.js: line 90, col 32, 'context_directionsfrom' is not defined.
app/assets/javascripts/index.js: line 93, col 32, 'context_directionsto' is not defined.
app/assets/javascripts/index.js: line 96, col 32, 'context_addnote' is not defined.
app/assets/javascripts/index.js: line 99, col 32, 'context_describe' is not defined.
app/assets/javascripts/index.js: line 102, col 32, 'context_queryhere' is not defined.
app/assets/javascripts/index.js: line 105, col 32, 'context_centrehere' is not defined.
app/assets/javascripts/index/contextmenu.js: line 1, col 7, 'context_describe' is defined but never used.
app/assets/javascripts/index/contextmenu.js: line 9, col 7, 'context_directionsfrom' is defined but never used.
app/assets/javascripts/index/contextmenu.js: line 19, col 7, 'context_directionsto' is defined but never used.
app/assets/javascripts/index/contextmenu.js: line 29, col 7, 'context_addnote' is defined but never used.
app/assets/javascripts/index/contextmenu.js: line 39, col 7, 'context_centrehere' is defined but never used.
app/assets/javascripts/index/contextmenu.js: line 43, col 7, 'context_queryhere' is defined but never used.
```

If anyone has any advice about the organisation of that bit of code, I'd be grateful. I could drop the refactor (omit commit 35fbcf2).
(IIUC the contextmenu needs to be added during the `new L.OSM.Map()` call rather than afterwards, which is what limited my refactoring choices.)

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1030#issuecomment-147519403
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20151012/89a7d269/attachment-0001.html>


More information about the rails-dev mailing list