Skip to content

Commit 75bb797

Browse files
authored
fix: Fix floorplan (ietf-tools#4160)
* fix: Fix the floorplan location highlighter * Revert erroneous commit
1 parent 0872651 commit 75bb797

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

ietf/static/js/room_params.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ window.setarrow = function (nm) {
9999
if (adiv) {
100100
adiv.style.left = arrow_left + offsetleft + "px";
101101
adiv.style.top = arrow_top + offsettop + "px";
102-
adiv.style.visibility = "visible";
102+
adiv.hidden = false;
103103
window.location.hash = floor;
104+
const url = new URL(location.href);
105+
url.searchParams.set('room', nm);
106+
history.pushState(null, '', url);
104107
}
105108
}
106109
}
@@ -116,7 +119,7 @@ window.removearrow = function (which, fl) {
116119
// if (verbose) console.log("adiv found");
117120
adiv.style.left = -500;
118121
adiv.style.top = -500;
119-
adiv.style.visibility = "hidden";
122+
adiv.hidden = true;
120123
}
121124
}
122125
};
@@ -182,4 +185,4 @@ window.automaticarrow = function () {
182185
// if (navigator.geolocation) {
183186
// navigator.geolocation.getCurrentPosition(located);
184187
// }
185-
};
188+
};

ietf/templates/meeting/floor-plan.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
IETF {{ meeting.number }} meeting agenda
99
{% if "-utc" in request.path %}(UTC){% endif %}
1010
{% endblock %}
11-
{% block bodyAttrs %}onload="automaticarrow(); checkParams();"{% endblock %}
11+
{% block bodyAttrs %}onload="automaticarrow(); checkParams();" onresize="checkParams();"{% endblock %}
1212
{% block content %}
1313
{% origin %}
1414
{% include "meeting/meeting_heading.html" with selected="floor-plan" title_extra="Floor Plan" %}
@@ -42,19 +42,19 @@ <h2 class="mt-4" id="floor-{{ floor.name|xslugify }}">{{ floor.name }}</h2>
4242
src="{{ floor.image.url }}">
4343
{# We need as many of these as we can have individual rooms combining into one #}
4444
<div id="floor-{{ floor.name|xslugify }}-arrowdiv0"
45-
class="position-absolute invisible">
45+
class="position-absolute" hidden>
4646
<img alt="Location arrow" src="{% static 'ietf/images/arrow-ani.webp' %}">
4747
</div>
4848
<div id="floor-{{ floor.name|xslugify }}-arrowdiv1"
49-
class="position-absolute invisible">
49+
class="position-absolute" hidden>
5050
<img alt="Location arrow" src="{% static 'ietf/images/arrow-ani.webp' %}">
5151
</div>
5252
<div id="floor-{{ floor.name|xslugify }}-arrowdiv2"
53-
class="position-absolute invisible">
53+
class="position-absolute" hidden>
5454
<img alt="Location arrow" src="{% static 'ietf/images/arrow-ani.webp' %}">
5555
</div>
5656
<div id="floor-{{ floor.name|xslugify }}-arrowdiv3"
57-
class="position-absolute invisible">
57+
class="position-absolute" hidden>
5858
<img alt="Location arrow" src="{% static 'ietf/images/arrow-ani.webp' %}">
5959
</div>
6060
{% else %}

0 commit comments

Comments
 (0)