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

Add hover model (indicates current value being hovered) #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rcrisp
Copy link

@rcrisp rcrisp commented May 3, 2017

This includes adding a scope variable (hoverModel) that binds the currently "hovered" value. It also switches ng-mouseenter to use ng-mousemove to determine stars being hovered. This allowed me to updated some of the "half star" logic so that half stars are shown in real time while the user is hovering. When I tried the test cases it would only show full stars and then a half star after it was clicked. This does create more scope digests though, as you can imagine. I'm not actually using half stars, so in my case ng-mouseenter would be more preferred. Perhaps in a future update this can automatically be determined and use the appropriate method.

I figured I would include the update for half stars since and leave it at mousemove since I got to tinkering with it anyway. Let me know if there was a reason it was setup the way it was instead. I added an example of the hover model to the index.html example page.

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.

1 participant