From 2e9ec23409e1c17223678dd11a3b6c49eccaa810 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Thu, 17 May 2018 10:33:46 +0100 Subject: Ignore non-interactive layers for asset message. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise a non-interactive layer applying to the same category as an asset layer can cause an ‘undefined’ message to appear. --- CHANGELOG.md | 1 + web/cobrands/fixmystreet/assets.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aea940ce0..fbc50442e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ - Response template containing double quote now works. - A few small display issues with RTL text display. - Improve handling of loading spinner display. #2059 + - Ignore non-interactive layers for asset message. - Admin improvements: - Inspectors can set non_public status of reports. #1992 - Default start date is shown on the dashboard. diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js index 7928b6941..321f09284 100644 --- a/web/cobrands/fixmystreet/assets.js +++ b/web/cobrands/fixmystreet/assets.js @@ -301,6 +301,9 @@ function find_matching_feature(feature, layer, asset_id_field) { } function check_zoom_message_visibility() { + if (this.fixmystreet.non_interactive) { + return; + } var category = $("#problem_form select#form_category").val(), prefix = category.replace(/[^a-z]/gi, ''), id = "category_meta_message_" + prefix, -- cgit v1.2.3