-
Notifications
You must be signed in to change notification settings - Fork 73
HoverScale Improvements #204
base: master
Are you sure you want to change the base?
Conversation
NGenesis
commented
May 28, 2017
- Added eventListener property to HoverScale behavior to allow other objects to trigger cursor events on behalf of the object that owns the behavior.
- Improved animation accuracy when HoverScale cursor hover state is changed mid-animation.
…jects to trigger cursor events on behalf of the object that owns the behavior. Improved animation accuracy when HoverScale cursor hover state is changed mid-animation.
This reverts commit 87a7cee.
I'm confused what functionality this PR actually adds. Wouldn't it make more sense to put the behavior on an empty node that's parent to the trigger and the receiver? |
The desired behavior using the eventListener property is to have one object trigger the scaling effect of another object when the trigger object is hovered over, without affecting the object that triggered the effect. For example:
The desired behavior using the eventListener property in this case is to have boxTarget's scale be affected when only boxTrigger is hovered over, without affecting the scale of boxTrigger or boxNeutral.
Does not satisfy the desired behavior.
Also does not satisfy the desired behavior.
Allowing the object that will trigger the scaling effect to be explicitly specified satisfies the desired behavior. |
Could you add a test case to |
Test case based on the above example can be found at examples/tests/behaviors-hoverscale.html |
Any updates/questions/comments about this pull request? |
Sorry for the delay. Finally got around to trying it out, it looks good! We'll merge it in with the next SDK push. Sound good? |