aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2018-07-31 12:08:37 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-08-07 13:56:33 +0100
commitc93ec5cdaae493ca04ed936e67f13403298917df (patch)
tree86110d4df590cffb6cb217811adb4555c062e2bf /web
parentc1f234d45ec4d9530973e75a8d994dd8c96a129c (diff)
call inspector setup when display report
If an inspector clicks on a report from an around page the code to setup the pin dragging needs to be called. This adds a method to the map to allow the setup code to be called on report load. Fixes #2073
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js4
-rw-r--r--web/js/map-OpenLayers.js4
2 files changed, 8 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 1b863625f..7d7a51d4a 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -1168,6 +1168,10 @@ fixmystreet.display = {
fixmystreet.maps.click_control.activate();
}
+ if (fixmystreet.maps.setup_inspector) {
+ fixmystreet.maps.setup_inspector();
+ }
+
if (typeof callback === 'function') {
callback();
}
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index b2b74648c..d95103f82 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -178,6 +178,10 @@ $.extend(fixmystreet.utils, {
return lonlat;
},
+ setup_inspector: function() {
+ setup_inspector_marker_drag();
+ },
+
markers_list: function(pins, transform) {
var markers = [];
var size = fixmystreet.maps.marker_size();