Skip to content

Commit

Permalink
browser: tooltip: add 'container' option
Browse files Browse the repository at this point in the history
Change-Id: I93c184ecd500411195d15709f9fcc37333988287
Signed-off-by: Henry Castro <[email protected]>
  • Loading branch information
hcvcastro committed Jan 3, 2025
1 parent 38db41d commit 38f2cf1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions browser/src/control/Control.Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ class Tooltip {
constructor(options) {
this._options = L.extend({ timeout: 150 }, options);
let win = this._options.window ? this._options.window : window;
this._container = L.DomUtil.create(
'div',
'cooltip-text',
win.document.body,
);
this._container = this._options.container
? this._options.container
: L.DomUtil.create('div', 'cooltip-text', win.document.body);
this._container.id = 'cooltip';
this._container.addEventListener(
'mouseenter',
Expand Down

0 comments on commit 38f2cf1

Please sign in to comment.