aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--CHANGELOG.md1
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js4
-rw-r--r--web/js/map-OpenLayers.js4
3 files changed, 9 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 97b7386d1..1a9232adc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@
- Hide password help field along with other similar. #2185
- Allow questionnaire link to be revisited in quick succession. #2123
- Update Google Maps directions link.
+ - Fix inspector pin dragging. #2073.
- Open311 improvements:
- CLOSED status maps to 'closed' state if extended statuses are enabled.
- Don't generate template comment text on move between fixed states.
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();