diff options
author | Josh Angell <jbangell@gmail.com> | 2012-03-09 17:15:54 +0000 |
---|---|---|
committer | Josh Angell <jbangell@gmail.com> | 2012-03-09 17:15:54 +0000 |
commit | 25ede12e9ebf5c34292ad9491430121f7e36ddf1 (patch) | |
tree | 16600f7f01ded4a6340306840941ad28dacf7519 /web/js/map-OpenLayers.js | |
parent | 8742bca85b88af69b2f6cf3e6095a873482a9d94 (diff) | |
parent | 7b96e41ebaf23febdd09f68df1acf6febad11dc5 (diff) |
Merge branch 'supercool' of github.com:mysociety/fixmystreet into supercool
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r-- | web/js/map-OpenLayers.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 101585c07..58d1e21ec 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -236,6 +236,9 @@ $(function(){ fixmystreet.map.moveStart = { zoom: this.getZoom(), center: this.getCenter() }; }); fixmystreet.map.events.register("zoomend", null, function(e){ + if ( fixmystreet.map.moveStart && !fixmystreet.map.moveStart.zoom ) { + return true; // getZoom() on Firefox appears to return null at first? + } if ( !fixmystreet.map.moveStart || !this.getCenter().equals(fixmystreet.map.moveStart.center) ) { // Centre has moved, e.g. by double-click. Same whether zoom in or out fixmystreet.map.pan(-q, -25, { animate: false }); @@ -433,6 +436,7 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { }); $('#side-form, #site-logo').show(); + fixmystreet.map.updateSize(); // might have done, and otherwise Firefox gets confused. /* For some reason on IOS5 if you use the jQuery show method it * doesn't display the JS validation error messages unless you do this * or you cause a screen redraw by changing the phone orientation. |