Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listen for an event to allow refreshing the ellipsis #58

Merged
merged 1 commit into from
Jan 4, 2016

Conversation

gstoyanov
Copy link
Contributor

Hello,

I added an event that allows users of the directive to tell it if it needs to rebuild. This makes it easy to implement collapse/expand functionality by just toggling a class and triggering the event: $scope.$broadcast('dibari:refresh-ellipsis');. Maybe this also solves issue #2?

Best,
Georgi

Users of the directive can now trigger the 'dibari:refresh-ellipsis'
event to refresh the ellipsis state. This can be used to implement
expand/collapse functionality just by changing the element's height and
triggering the event: $scope.$broadcast('dibari:refresh-ellipsis');
MauMaGau added a commit that referenced this pull request Jan 4, 2016
Listen for an event to allow refreshing the ellipsis
@MauMaGau MauMaGau merged commit ed4fbf2 into dibari:master Jan 4, 2016
@tomobrien2004
Copy link

Hi Georgi,

This is a very good addition. One questions though - does this mean if there are multiple ellipsis elements in a page, all of them will rebuild themselves once you do the broadcast? Or is there a way to tell a particular ellipsis element to rebuild using your solution?

Thanks,
Tom

@gurumvg
Copy link

gurumvg commented Jan 26, 2021

Hello,

I added an event that allows users of the directive to tell it if it needs to rebuild. This makes it easy to implement collapse/expand functionality by just toggling a class and triggering the event: $scope.$broadcast('dibari:refresh-ellipsis');. Maybe this also solves issue #2?

Best,
Georgi

@gstoyanov - can you help with an example on how to use the $scope.$broadcast('dibari:refresh-ellipsis'); event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants