CombodoTooltip: Add option to define max. width of the tooltip

This commit is contained in:
Molkobain
2021-12-05 11:47:27 +01:00
parent afc0a02058
commit c451e61972

View File

@@ -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';