From ada8fb7cf85dbb3bfb6803dab3e74b3fd2d6a47e Mon Sep 17 00:00:00 2001 From: s-egge <102624422+s-egge@users.noreply.github.com> Date: Sun, 26 Nov 2023 23:05:12 -0800 Subject: [PATCH] [PR] Fix comparison menu cancel bug (#281) Set building_compare_error to false in two places so that the modal will close if a building is clicked on or a new comparison is started. --- src/components/map/map.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/map/map.vue b/src/components/map/map.vue index 56fa338d..433b854d 100644 --- a/src/components/map/map.vue +++ b/src/components/map/map.vue @@ -201,6 +201,7 @@ export default { buildingOptions: { onEachFeature: ( feature, layer ) => { layer.on( 'click', e => { + this.building_compare_error = false this.polyClick( e.target.feature.properties.id, e.target.feature, layer.getBounds().getCenter() ) } ) layer.on( 'mouseover', function ( e ) { @@ -396,6 +397,7 @@ export default { } }, startCompare: function ( buildingId ) { + this.building_compare_error = false this.showSide = false this.askingForComparison = true this.compareStories = []