[openstreetmap/openstreetmap-website] Ensure IE/Edge compatibility for routing drag&drop (#1344)

Petr Kadlec notifications at github.com
Thu Oct 27 10:39:04 UTC 2016


Use the DataTransfer interface properly, using the `text` format, as IE/Edge does not support much more. We can JSON-serialize anything there, even though right now, only a single string would be enough. (This might be unnecessarily complicated right now, and in the spirit of KISS, we might use just `dt.setData('text', $(this).data('type')` and `type = oe.dataTransfer.getData('text')`. Your call.)

Also, IE does not support .setDragImage, so check for support prior to calling.

Fixes #1343
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/1344

-- Commit Summary --

  * Ensure IE/Edge compatibility for routing drag&drop

-- File Changes --

    M app/assets/javascripts/index/directions.js (15)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/1344.patch
https://github.com/openstreetmap/openstreetmap-website/pull/1344.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1344
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20161027/68dbf936/attachment.html>


More information about the rails-dev mailing list