Skip to content

Commit

Permalink
Merge branch 'development' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
John Shields authored and John Shields committed Nov 22, 2021
2 parents 53d57e6 + 189bcdf commit 3a8afec
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
8 changes: 6 additions & 2 deletions server/src/js/components/map/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ window.flood.maps.MapContainer = function MapContainer (mapId, options) {
// Disable body scrolling and hide non-map elements
document.title = options.title
document.body.classList.add('defra-map-body')
document.documentElement.classList.add('defra-map-html')

// Create the map container element
const containerElement = document.createElement('div')
Expand Down Expand Up @@ -256,6 +257,7 @@ window.flood.maps.MapContainer = function MapContainer (mapId, options) {
document.title = options.originalTitle
// Unlock body scroll
document.body.classList.remove('defra-map-body')
document.documentElement.classList.remove('defra-map-html')
clearAllBodyScrollLocks()
// Remove map and return focus
containerElement.parentNode.removeChild(containerElement)
Expand Down Expand Up @@ -436,9 +438,11 @@ window.flood.maps.MapContainer = function MapContainer (mapId, options) {

// Mouse or touch interaction
containerElement.addEventListener('pointerdown', (e) => {
infoElement.blur()
keyElement.blur()
viewport.removeAttribute('keyboard-focus')
// Address OpenLayers performance bug when viewport has focus?
if (document.activeElement === viewport) {
exitMapButtonElement.focus()
}
})

// Disable pinch and double tap zoom
Expand Down
6 changes: 6 additions & 0 deletions server/src/sass/components/map/_map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
@include defra-visually-hidden;
}
}
.defra-map-html {
height: 100vh;
}
.defra-map-body {
position: fixed;
overflow: hidden;
Expand All @@ -40,6 +43,9 @@
bottom:0px;
left:0px;
}
.defra-map-visibility-hidden {
visibility: hidden;
}
.defra-map-viewport {
-webkit-touch-callout: none;
-webkit-user-select: none;
Expand Down
4 changes: 2 additions & 2 deletions server/src/templates/info-outlook.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ <h2 class="govuk-heading-s">{{ model.name }}</h2>
{% case "2-i4-l1" %}
<span>It’s possible but not expected that {{ messageText.sources[0] }} will cause severe flooding and travel disruption.</span>
{% case "3-i3-l3" %}
<span>It’s possible but not expected that {{ messageText.sources[0] }} will cause properties and roads to flood. If this happens, your life might be in danger.</span>
<span>It’s likely that {{ messageText.sources[0] }} will cause properties and roads to flood. If this happens, your life might be in danger.</span>
{% case "3-i3-l4" %}
<span>It’s possible but not expected that {{ messageText.sources[0] }} will cause properties and roads to flood. If this happens, your life might be in danger.</span>
<span>We expect {{ messageText.sources[0] }} to cause properties and roads to flood. If this happens, your life might be in danger.</span>
{% case "3-i4-l2" %}
<span>{{ messageText.sources[0] | capitalize }} could cause severe flooding and travel disruption. If this happens, your life might be in danger. Be prepared to evacuate.</span>
{% case "3-i4-l3" %}
Expand Down
4 changes: 2 additions & 2 deletions server/views/partials/outlook-region-messages.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
{% case "2-i4-l1" %}
<span>It’s possible but not expected that {{ sources }} will cause severe flooding and travel disruption.</span>
{% case "3-i3-l3" %}
<span>It’s possible but not expected that {{ sources }} will cause properties and roads to flood. If this happens, your life might be in danger.</span>
<span>It’s likely that {{ sources }} will cause properties and roads to flood. If this happens, your life might be in danger.</span>
{% case "3-i3-l4" %}
<span>It’s possible but not expected that {{ sources }} will cause properties and roads to flood. If this happens, your life might be in danger.</span>
<span>We expect {{ sources }} to cause properties and roads to flood. If this happens, your life might be in danger.</span>
{% case "3-i4-l2" %}
<span>{{ sources | capitalize }} could cause severe flooding and travel disruption. If this happens, your life might be in danger. Be prepared to evacuate.</span>
{% case "3-i4-l3" %}
Expand Down

0 comments on commit 3a8afec

Please sign in to comment.