diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-09-11 12:36:57 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-09-17 11:13:34 +0100 |
commit | 0a96422e2d83fd461d3867c52f5aaacf5fa41a6e (patch) | |
tree | 2204c16e3e3cedf29404d41391c3ce8637c641e5 /web/js/map-google.js | |
parent | 70ab7d97702e2b1be8cf37120660a16daa99556c (diff) |
Update JavaScript to handle right-to-left layout.
Diffstat (limited to 'web/js/map-google.js')
-rw-r--r-- | web/js/map-google.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/web/js/map-google.js b/web/js/map-google.js index 8364b40df..0e7cd824e 100644 --- a/web/js/map-google.js +++ b/web/js/map-google.js @@ -192,10 +192,8 @@ function fms_map_initialize() { if (fixmystreet.state_map && fixmystreet.state_map == 'full') { // TODO Work better with window resizing, this is pretty 'set up' only at present - var $content = $('.content'), mb = $('#map_box'), - q = ( $content.offset().left - mb.offset().left + $content.width() ) / 2; - if (q < 0) { q = 0; } - // Need to try and fake the 'centre' being 75% from the left + var q = fixmystreet_midpoint(); + // Need to try and fake the 'centre' being 75% from the edge fixmystreet.map.panBy(-q, -25); } |