From c36a425b1aab2245d9aaef66239cb1841aa967a5 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 12 Jul 2016 13:33:44 +0100 Subject: Fix a few JavaScript issues with reports pages. Don't stringify pin problem ID, as get_marker_by_id assumes it will be an integer; only activate the bounding box strategy if it exists; make sure a refresh of the markers happens when going back to the list; set the Back link on a pulled-in report to the current URL. --- web/js/map-OpenLayers.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'web/js/map-OpenLayers.js') diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index f6e7e8a62..e1f152820 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -27,12 +27,17 @@ var fixmystreet = fixmystreet || {}; fixmystreet.map.updateSize(); // Dragging the map should fetch new local reports from server - fixmystreet.bbox_strategy.activate(); + if (fixmystreet.bbox_strategy) { + fixmystreet.bbox_strategy.activate(); + } // Should not be able to drag normal pins!! drag.deactivate(); // Force a redraw to return (de)selected marker to normal size + // Redraw for all pages, kick off a refresh too for around + // TODO Put 'new report' pin in different layer to simplify this and elsewhere + fixmystreet.maps.markers_resize(); fixmystreet.markers.refresh({force: true}); }, -- cgit v1.2.3