From 9f873b3538b6bf23064ec7a51df3841500e67377 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 8 May 2012 18:22:23 +0100 Subject: sort out map scrolling when click where sidebar will be --- web/js/map-OpenLayers.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web/js/map-OpenLayers.js') diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 1574754c9..a215e923e 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -466,6 +466,8 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { // e.xy is relative to top left of map, which might not be top left of page e.xy.x += bo.left; e.xy.y += bo.top; + + // 24 and 64 is the width and height of the marker pin if (e.xy.y <= o.top || (e.xy.x >= o.left && e.xy.x <= o.left + w + 24 && e.xy.y >= o.top && e.xy.y <= o.top + h + 64)) { // top of the page, pin hidden by header; // or underneath where the new sidebar will appear -- cgit v1.2.3