Skip to content

Commit

Permalink
fix: Fix floorplan (ietf-tools#4160)
Browse files Browse the repository at this point in the history
* fix: Fix the floorplan location highlighter

* Revert erroneous commit
  • Loading branch information
larseggert authored Jul 6, 2022
1 parent 0872651 commit 75bb797
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 6 additions & 3 deletions ietf/static/js/room_params.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand All @@ -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;
}
}
};
Expand Down Expand Up @@ -182,4 +185,4 @@ window.automaticarrow = function () {
// if (navigator.geolocation) {
// navigator.geolocation.getCurrentPosition(located);
// }
};
};
10 changes: 5 additions & 5 deletions ietf/templates/meeting/floor-plan.html
Original file line number Diff line number Diff line change
Expand Up @@ -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" %}
Expand Down Expand Up @@ -42,19 +42,19 @@ <h2 class="mt-4" id="floor-{{ floor.name|xslugify }}">{{ floor.name }}</h2>
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 %}
Expand Down

0 comments on commit 75bb797

Please sign in to comment.