You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I show all text on click please ? I tried to change the height of element, but I think it needs some 'restart' after then. Can you help me ? Thankx
You want the full text to be shown when the append text is clicked? Or, you want the full text to be shown when any of the concatenated text is clicked?
I'm running into the same issue. I have angular-ellipsis working and truncating correctly, but when I add ellipsis-append and ellipsis-append-click, I'm not sure how to "turn off" the truncation effect when I click the ellipsis-append element.
For example, here I have my section set to max-height: 150px, and when you click Read more, I remove the max-height by using ng-class:
I can observe in the Web Inspector that the unabbreviated class is being applied by Angular when I click the ellipsis-append element, so that part is working correctly, but angular-ellipsis does not then re-evaluate the element's new height and show the full text that existed before the directive was applied.
I just noticed something: the above is still true, but I can trigger the re-evaluation of the height by resizing my browser just a little. So, to make the above "work", I click Read more, then resize my browser window. It's so close to perfect!
Sorry, I don't think I have that snippet anymore, @Adam-Goldman7. The shipping code ended up with a small directive wrapping jQuery dotdotdot, and that's been working well in production for some time.
@max-l It's remarkably short. Once dotdotdot is loaded (I use RequireJS, but really any JS loader ought to work), you keep track of whether you've already applied dotdotdot to the element, and if not, apply it:
Activity
dibari commentedon Jan 27, 2014
You want the full text to be shown when the append text is clicked? Or, you want the full text to be shown when any of the concatenated text is clicked?
LordZombi commentedon Jan 27, 2014
Just when I click on append text would be OK.
command-tab commentedon Mar 21, 2014
I'm running into the same issue. I have angular-ellipsis working and truncating correctly, but when I add
ellipsis-appendandellipsis-append-click, I'm not sure how to "turn off" the truncation effect when I click theellipsis-appendelement.For example, here I have my
sectionset tomax-height: 150px, and when you click Read more, I remove themax-heightby usingng-class:I can observe in the Web Inspector that the
unabbreviatedclass is being applied by Angular when I click theellipsis-appendelement, so that part is working correctly, but angular-ellipsis does not then re-evaluate the element's new height and show the full text that existed before the directive was applied.command-tab commentedon Mar 21, 2014
I just noticed something: the above is still true, but I can trigger the re-evaluation of the height by resizing my browser just a little. So, to make the above "work", I click Read more, then resize my browser window. It's so close to perfect!
command-tab commentedon Mar 21, 2014
I seem to have fixed this by calling
buildEllipsis();right afterscope.$applygets called, but I'm unsure if it's a good fix.goldylucks commentedon Mar 30, 2015
Can u share your code @commandtab ?
How do you trigger that? Did you fork the project?
command-tab commentedon Mar 30, 2015
Sorry, I don't think I have that snippet anymore, @Adam-Goldman7. The shipping code ended up with a small directive wrapping jQuery dotdotdot, and that's been working well in production for some time.
max-l commentedon Aug 27, 2015
@commandtab, would you mind sharing your dotdotdot angular integration ?
command-tab commentedon Aug 27, 2015
@max-l It's remarkably short. Once dotdotdot is loaded (I use RequireJS, but really any JS loader ought to work), you keep track of whether you've already applied
dotdotdotto the element, and if not, apply it:Usage might be a little different depending on if your directive's content is being trusted as HTML, but that's the basic idea.