Skip to content

Commit

Permalink
set z-index of tooltip so its always on top
Browse files Browse the repository at this point in the history
  • Loading branch information
joewdavies committed Dec 5, 2024
1 parent d5a22a8 commit a55515c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/test/test-tooltips.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ <h1>Test multiple instances / tooltips</h1>
x: 4500000,
y: 2900000,
z: 2000,
}).addZoomButtons()
})
.addZoomButtons()
.addFullscreenButton()

//define multi resolution dataset
const dataset = new gridviz.MultiResolutionDataset(
Expand Down
1 change: 1 addition & 0 deletions src/core/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class Tooltip {
this.tooltip.style('pointer-events', 'none')
this.tooltip.style('opacity', '0')
this.tooltip.style('text-wrap', 'nowrap')
this.tooltip.style('z-index', 99999999) // important for leaflet-gridviz etc

// these placeholders are needed to prevent an infinite DOM resizeObserver loop:
this.tooltip.style('left', '0')
Expand Down

0 comments on commit a55515c

Please sign in to comment.