From 9353e7086d89679fdab94e1110fb8a9321b6f521 Mon Sep 17 00:00:00 2001 From: xmedeko Date: Wed, 26 Nov 2014 09:44:39 +0100 Subject: [PATCH] Show autotooltip when text overflow vertically --- plugins/slick.autotooltips.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/slick.autotooltips.js b/plugins/slick.autotooltips.js index 955684f2a..e8a3b8bda 100644 --- a/plugins/slick.autotooltips.js +++ b/plugins/slick.autotooltips.js @@ -49,7 +49,7 @@ if (cell) { var $node = $(_grid.getCellNode(cell.row, cell.cell)); var text; - if ($node.innerWidth() < $node[0].scrollWidth) { + if ($node.innerWidth() < $node[0].scrollWidth || $node.innerHeight() < $node[0].scrollHeight) { text = $.trim($node.text()); if (options.maxToolTipLength && text.length > options.maxToolTipLength) { text = text.substr(0, options.maxToolTipLength - 3) + "..."; @@ -80,4 +80,4 @@ "destroy": destroy }); } -})(jQuery); \ No newline at end of file +})(jQuery);