Sunday, January 4, 2015

Re: Creating CSS Animations dynamically?

Actually, a quick note to anyone in future googleing this (hi!) beware of another limitation in firefox

"During a CSS transition, getComputedStyle returns the original property value in Firefox, but the final property value in WebKit."
https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle

So, in firefox, your cant query the current position mid-transition. At least not in the way.
I got a workaround for my own use-case, but thought it was worth noting.


~~~
Thomas & Bertines online review show:
http://randomreviewshow.com/index.html
Try it! You might even feel ambivalent about it :)

On 4 January 2015 at 00:52, Thomas Wrobel <darkflame@gmail.com> wrote:
perfect.
I wasn't aware you could do it just like that. That works fine. (at least on FF and Chrome).

Also saves me from having all those ugly vendor extensions.


~~~
Thomas & Bertines online review show:
http://randomreviewshow.com/index.html
Try it! You might even feel ambivalent about it :)

On 3 January 2015 at 22:13, Jens <jens.nehlmeier@gmail.com> wrote:
Have you tried using transitions instead of animations?

So you add 

transition:transform ease-in-out 1s;
transform:translate(0px, 0px);

as CSS class to the element you want to translate and then dynamically add a style attribute to that element which contains transform:translate(targetX, targetY);

-- J.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/5h6FeUdIh88/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment