Merge pull request #11379 from jipexu/tooltipbranch

tooltip bs on fullscreen
This commit is contained in:
Andreas Hocevar
2020-08-02 21:42:34 +02:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ title: Custom Tooltips
shortdesc: This example shows how to customize the buttons tooltips with Bootstrap.
docs: >
This example shows how to customize the buttons tooltips with <a href="https://getbootstrap.com/docs/4.5/components/tooltips/">Bootstrap</a>.
For the tooltips to work in fullscreen mode, set the container property to a selector that matches the map target.
tags: "custom, tooltip"
resources:
- https://code.jquery.com/jquery-3.5.1.min.js

View File

@@ -19,7 +19,9 @@ const map = new Map({
$('.ol-zoom-in, .ol-zoom-out').tooltip({
placement: 'right',
container: '#map',
});
$('.ol-rotate-reset, .ol-attribution button[title]').tooltip({
placement: 'left',
container: '#map',
});