Skip to content

Commit

Permalink
[PR] Fix comparison menu cancel bug (#281)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
s-egge authored Nov 27, 2023
1 parent ef715f4 commit ada8fb7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/map/map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -396,6 +397,7 @@ export default {
}
},
startCompare: function ( buildingId ) {
this.building_compare_error = false
this.showSide = false
this.askingForComparison = true
this.compareStories = []
Expand Down

0 comments on commit ada8fb7

Please sign in to comment.