diff --git a/browser/src/control/Control.Tooltip.js b/browser/src/control/Control.Tooltip.js index bd8e21beab21..bc756510d9ba 100644 --- a/browser/src/control/Control.Tooltip.js +++ b/browser/src/control/Control.Tooltip.js @@ -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',