-
Notifications
You must be signed in to change notification settings - Fork 3.4k
ripple: incorrect positioning behaviour #1088
Comments
👍 seems very odd.. Who wrote this? |
@artch - The commented code seems to yield a much better UX. |
This was done according to the Material spec, as demonstrated in the first animation on this page: http://www.google.com/design/spec/animation/responsive-interaction.html# However, in other examples, this does not occur. We should clarify with the Material team when this should and shouldn't happen. |
Also, this centering animation is important for the held state; however, I believe that earlier, this part of the animation was slowed down to make it less apparent unless you actually held the click. In either case, we should look into ways to make it fit better. |
@robertmesserle - the corner-clicks [with line 209 included] definitely looks odd. |
Agreed, this is emphasized by the square button and the non-filling ripple. On Thu, Jan 1, 2015, 7:46 PM Thomas Burleson notifications@github.com
|
👍 |
I added an attribute to allow you to override the ripple sizing based on your use-case: https://material.angularjs.org/#/api/material.components.button/directive/mdButton You would want to add |
@robertmesserle what is the default? |
The default functionality is that with |
@robertmesserle the ripple code is based off which Material sample? They seem to go more edge-to-edge and a little bit faster, no? |
If you look here: Under the heading of "buttons in motion" they have an animation in which the ripples do not fill the buttons. There is also an example of this with list items in the first example on this page: Of course, the middle example shows it filling the space, so both are supported in different circumstances. |
Ok I was thinking of the middle one, so I just wanted to clarify. |
I investigated some weird cases in ripple behavior and found this piece of code in the ripple service:
Last statement (line 209,
elem.css({ left: '50%', top: '50%' })
) causes inconsistent behavior of ripple positioning. Here are some examples:With line 209 included:
With line 209 commented:
What is that last
elem.css
statement for? It seems to be something not supposed to be there.The text was updated successfully, but these errors were encountered: