mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
CombodoTooltip: Add option to define max. width of the tooltip
This commit is contained in:
@@ -849,6 +849,12 @@ const CombodoTooltip = {
|
||||
oOptions['appendTo'] = mAppendTo;
|
||||
}
|
||||
|
||||
// Max. width overload
|
||||
const sMaxWidth = oElem.attr('data-tooltip-max-width');
|
||||
if ((sMaxWidth !== undefined) && (sMaxWidth !== '')) {
|
||||
oOptions['maxWidth'] = sMaxWidth;
|
||||
}
|
||||
|
||||
oOptions['placement'] = oElem.attr('data-tooltip-placement') ?? 'top';
|
||||
oOptions['trigger'] = oElem.attr('data-tooltip-trigger') ?? 'mouseenter focus';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user