From 67340db308ab57946b34cb211860c72fd2884ea5 Mon Sep 17 00:00:00 2001 From: Shai Boharon Date: Tue, 11 Jul 2017 15:53:40 +0300 Subject: [PATCH] fix(): set variable for full text retrieval --- src/angular-ellipsis.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/angular-ellipsis.js b/src/angular-ellipsis.js index 1c5eb12..b233005 100644 --- a/src/angular-ellipsis.js +++ b/src/angular-ellipsis.js @@ -130,6 +130,9 @@ angular.module('dibari.angular-ellipsis', []) //Set data-overflow on element for targeting element.attr('data-overflowed', 'true'); + //for bootstrap using + scope.$parent.$overflowFull = binding; + // Set complete text and remove one word at a time, until there is no overflow for (; i < bindArrayStartingLength; i++) { var current = bindArray.pop(); @@ -168,7 +171,9 @@ angular.module('dibari.angular-ellipsis', []) } } else{ + // remove set data in case text is no longer overflowing element.attr('data-overflowed', 'false'); + scope.$parent.$overflowFull = ''; } } }