From 75bb797d9e5551c652c04b503f7e1fd339edf013 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Wed, 6 Jul 2022 22:18:44 +0300 Subject: [PATCH] fix: Fix floorplan (#4160) * fix: Fix the floorplan location highlighter * Revert erroneous commit --- ietf/static/js/room_params.js | 9 ++++++--- ietf/templates/meeting/floor-plan.html | 10 +++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ietf/static/js/room_params.js b/ietf/static/js/room_params.js index 724d2b6bc..ef32c2fa0 100644 --- a/ietf/static/js/room_params.js +++ b/ietf/static/js/room_params.js @@ -99,8 +99,11 @@ window.setarrow = function (nm) { if (adiv) { adiv.style.left = arrow_left + offsetleft + "px"; adiv.style.top = arrow_top + offsettop + "px"; - adiv.style.visibility = "visible"; + adiv.hidden = false; window.location.hash = floor; + const url = new URL(location.href); + url.searchParams.set('room', nm); + history.pushState(null, '', url); } } } @@ -116,7 +119,7 @@ window.removearrow = function (which, fl) { // if (verbose) console.log("adiv found"); adiv.style.left = -500; adiv.style.top = -500; - adiv.style.visibility = "hidden"; + adiv.hidden = true; } } }; @@ -182,4 +185,4 @@ window.automaticarrow = function () { // if (navigator.geolocation) { // navigator.geolocation.getCurrentPosition(located); // } -}; \ No newline at end of file +}; diff --git a/ietf/templates/meeting/floor-plan.html b/ietf/templates/meeting/floor-plan.html index 614253c25..0aeb84d70 100644 --- a/ietf/templates/meeting/floor-plan.html +++ b/ietf/templates/meeting/floor-plan.html @@ -8,7 +8,7 @@ IETF {{ meeting.number }} meeting agenda {% if "-utc" in request.path %}(UTC){% endif %} {% endblock %} -{% block bodyAttrs %}onload="automaticarrow(); checkParams();"{% endblock %} +{% block bodyAttrs %}onload="automaticarrow(); checkParams();" onresize="checkParams();"{% endblock %} {% block content %} {% origin %} {% include "meeting/meeting_heading.html" with selected="floor-plan" title_extra="Floor Plan" %} @@ -42,19 +42,19 @@ src="{{ floor.image.url }}"> {# We need as many of these as we can have individual rooms combining into one #} {% else %}