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

translate3d for firefox 10+ #26

Open
inlet opened this issue Mar 8, 2012 · 3 comments
Open

translate3d for firefox 10+ #26

inlet opened this issue Mar 8, 2012 · 3 comments

Comments

@inlet
Copy link

inlet commented Mar 8, 2012

Hi,

Running this awesome plugin in FF 10+ does still apply a transform: translate(x,y) instead of translate3d(x,y). Do you have any idea when this will be implemented?

Thanks for the great work man, I really love the plugin and use it for a big commercial project right now..
will let you know ;)

Thanks in advance!

Cheers,
Patrick

@rstacruz
Copy link
Owner

rstacruz commented Mar 8, 2012

using translate3d(x,y,0) instead of translate(x,y) is a hack Transit uses to get animations smooth on older iOS versions. Using translate3d in Firefox 10 will yield the same result as translate, without any performance improvement, I believe.

What are you trying to accomplish?

@inlet
Copy link
Author

inlet commented Mar 8, 2012

inlet commented 9 minutes ago
I have to say that's not completely true. translate uses a 2d transformation and runs slower than translate3d. The performance difference is pretty big. and a side-effect of translate (only in FF) is that user components like dropdown boxes are unreachable and besides retrieving the offset() of an element should give you the position relative to the document.. unfortunately the translate() in FF doesn't give you the correct values of an element position in the element that is beeing transformed..

I really hope you can rewrite it to translate3d for 3d supported browsers. Many thanks!

okonet added a commit to okonet/jquery.transit that referenced this issue May 15, 2012
@icd2k3
Copy link

icd2k3 commented Jan 2, 2013

Can I ask why chrome is the exception?

Edit: sorry, should have checked the non-minified version first, comments answered my question -

// We've seen the 3D version of Scale() not work in Chrome when the
// element being scaled extends outside of the viewport. Thus, we're
// forcing Chrome to not use the 3d transforms as well. Not sure if
// translate is affectede, but not risking it. Detection code from
// http://davidwalsh.name/detecting-google-chrome-javascript

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

No branches or pull requests

3 participants