[openstreetmap/openstreetmap-website] Map jumps after left sidebar is closed (#1255)

strump notifications at github.com
Wed Jul 20 11:58:14 UTC 2016

Steps to reproduce:

1. Open link https://www.openstreetmap.org/way/140950703
2. Drag the map (this is important!)
3. Close left sidebar
4. Drag the map:

**Actual result:** map jumps to the left when you start dragging;
**Expected result:** map is dragged normally.


I found two workarounds:

### Workaround 1:
In [leaflet.map.js line #263](https://github.com/openstreetmap/openstreetmap-website/blob/master/app/assets/javascripts/leaflet.map.js#L263) put `animate:true`. I don't know why, but it helps.

### Workaround 2:
In [leaflet.js line #8664](https://github.com/openstreetmap/openstreetmap-website/blob/master/vendor/assets/leaflet/leaflet.js#L8664)
remove assignment `this._el._leaflet_pos = this._newPos`. For some reason, this could help.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160720/b28dedc5/attachment.html>

More information about the rails-dev mailing list