From aa47f3eba22206b62d5bd16e1110d02c63fc7245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Garci=CC=81a=20Hierro?= Date: Fri, 13 Jul 2018 11:08:14 +0100 Subject: [PATCH] Make the attribution link in Missions tab open an external window Otherwise it overrides the viewport of the configurator. The GPS tab doesn't have this problem because it uses an intermediate iframe to host the map. Fixes #540 --- tabs/mission_control.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tabs/mission_control.js b/tabs/mission_control.js index 833d86e6..0a7c6aaf 100644 --- a/tabs/mission_control.js +++ b/tabs/mission_control.js @@ -339,6 +339,17 @@ TABS.mission_control.initialize = function (callback) { }) }); + // Set the attribute link to open on an external browser window, so + // it doesn't interfere with the configurator. + var interval; + interval = setInterval(function() { + var anchor = $('.ol-attribution a'); + if (anchor.length) { + anchor.attr('target', '_blank'); + clearInterval(interval); + } + }, 100); + map.on('click', function (evt) { if (selectedMarker != null) { try {