fix: Fix floorplan (#4160)

* fix: Fix the floorplan location highlighter

* Revert erroneous commit
This commit is contained in:
Lars Eggert 2022-07-06 22:18:44 +03:00 committed by GitHub
parent 087265118d
commit 75bb797d9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View file

@ -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;
}
}
};

View file

@ -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 #}
<div id="floor-{{ floor.name|xslugify }}-arrowdiv0"
class="position-absolute invisible">
class="position-absolute" hidden>
<img alt="Location arrow" src="{% static 'ietf/images/arrow-ani.webp' %}">
</div>
<div id="floor-{{ floor.name|xslugify }}-arrowdiv1"
class="position-absolute invisible">
class="position-absolute" hidden>
<img alt="Location arrow" src="{% static 'ietf/images/arrow-ani.webp' %}">
</div>
<div id="floor-{{ floor.name|xslugify }}-arrowdiv2"
class="position-absolute invisible">
class="position-absolute" hidden>
<img alt="Location arrow" src="{% static 'ietf/images/arrow-ani.webp' %}">
</div>
<div id="floor-{{ floor.name|xslugify }}-arrowdiv3"
class="position-absolute invisible">
class="position-absolute" hidden>
<img alt="Location arrow" src="{% static 'ietf/images/arrow-ani.webp' %}">
</div>
{% else %}