Skip to content

Commit

Permalink
Merge pull request #224 from akhuoa/bugfix/connectivity-tooltip
Browse files Browse the repository at this point in the history
Fix hover over the map after connectivity tooltip shown
  • Loading branch information
alan-wu authored Jan 15, 2025
2 parents f6bb54e + 9074361 commit ce716fb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"./src/*": "./src/*"
},
"dependencies": {
"@abi-software/flatmap-viewer": "3.2.11",
"@abi-software/flatmap-viewer": "3.2.12",
"@abi-software/map-utilities": "^1.3.1",
"@abi-software/sparc-annotation": "0.3.2",
"@abi-software/svg-sprite": "^1.0.1",
Expand Down
14 changes: 13 additions & 1 deletion src/components/FlatmapVuer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ const centroid = (geometry) => {
} else {
coordinates = geometry.coordinates
}
if (coordinates) {
if (coordinates) {
if (!(geometry.type === 'Point')) {
coordinates.map((coor) => {
featureGeometry.lng += parseFloat(coor[0])
Expand Down Expand Up @@ -1703,6 +1703,12 @@ export default {
* Function to remove active tooltips on map.
*/
removeActiveTooltips: function () {
// Remove active tooltip/popup on map
if (this.mapImp) {
this.mapImp.removePopup();
}
// Fallback: remove any existing toolitp on DOM
const tooltips = this.$el.querySelectorAll('.flatmap-tooltip-popup');
tooltips.forEach((tooltip) => tooltip.remove());
},
Expand Down Expand Up @@ -3405,6 +3411,12 @@ export default {
border-style: solid;
flex-shrink: 0;
}
hr {
margin: 0.5rem 0;
border: 0;
border-top: 1px solid var(--el-border-color);
}
}
.maplibregl-popup-tip {
display: none;
Expand Down

0 comments on commit ce716fb

Please sign in to comment.