tooltip bs on fullscreen

This commit is contained in:
jeanpierre
2020-08-02 20:41:30 +02:00
parent 2658dec59d
commit 6f59216974
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. shortdesc: This example shows how to customize the buttons tooltips with Bootstrap.
docs: > docs: >
This example shows how to customize the buttons tooltips with <a href="https://getbootstrap.com/docs/4.5/components/tooltips/">Bootstrap</a>. 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" tags: "custom, tooltip"
resources: resources:
- https://code.jquery.com/jquery-3.5.1.min.js - 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({ $('.ol-zoom-in, .ol-zoom-out').tooltip({
placement: 'right', placement: 'right',
container: '#map',
}); });
$('.ol-rotate-reset, .ol-attribution button[title]').tooltip({ $('.ol-rotate-reset, .ol-attribution button[title]').tooltip({
placement: 'left', placement: 'left',
container: '#map',
}); });