-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Bugfixes - Fix a race condition on the full page map (#786) - Fixed a bug on the full page map where NLP filters in the search query would not work properly after a 'Search this Area' search was performed (#819)
- Loading branch information
Showing
11 changed files
with
15 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,11 @@ | ||
function addFullPageMap() { | ||
{{> theme-components/theme-map/script}} | ||
{{> theme-components/vertical-full-page-map/script}} | ||
} | ||
|
||
if (window.locatorBundleLoaded) { | ||
addFullPageMap(); | ||
} else { | ||
const locatorBundleScript = document.querySelector('script#js-answersLocatorBundleScript'); | ||
locatorBundleScript.onload = () => { | ||
window.locatorBundleLoaded = true; | ||
locatorBundleScript.dispatchEvent(new Event('vertical-full-page-map-bundle-loaded')); | ||
addFullPageMap(); | ||
} | ||
} | ||
{{> theme-components/theme-map/script}} | ||
{{> theme-components/vertical-full-page-map/script}} | ||
|
||
/** | ||
* Registers listeners on the card once the locator bundle is loaded | ||
* Registers listeners on the card | ||
* | ||
* @param {ANSWERS.Component} card A location card | ||
*/ | ||
function registerVerticalFullPageMapCardListeners(card) { | ||
if (window.locatorBundleLoaded) { | ||
new VerticalFullPageMap.CardListenerAssigner({card: card}).addListenersToCard(); | ||
return; | ||
} | ||
const verticalFullPageMapScript = document.querySelector('script#js-verticalFullPageMapScript'); | ||
verticalFullPageMapScript.addEventListener('vertical-full-page-map-bundle-loaded', () => { | ||
new VerticalFullPageMap.CardListenerAssigner({card: card}).addListenersToCard(); | ||
}); | ||
function registerVerticalFullPageMapCardListeners(card) { | ||
new VerticalFullPageMap.CardListenerAssigner({card: card}).addListenersToCard(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
test-site/pages-patches/locations_full_page_map_with_filters.html.hbs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters