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

could you create an AngularJS version? #76

Open
kmturley opened this issue Apr 25, 2016 · 2 comments
Open

could you create an AngularJS version? #76

kmturley opened this issue Apr 25, 2016 · 2 comments

Comments

@kmturley
Copy link

I've started an AngularJS directive, but it's not quite as smooth and springy as your version. Wondering if you would consider converting yours to work for AngularJS?

Here is my version for AngularJS
https://jsfiddle.net/kmturley/ruwajt2e/6/

@dominickolbe
Copy link

sorry but your angular code is so bad
never use something like this:
el.css('transform', 'scale(1) translateX(0px) translateY(0px)');

do you know vendor prefixes? your code is not 'the angular way'

@kmturley
Copy link
Author

kmturley commented May 9, 2016

You don't need vendor prefixes to support transforms on current (and many previous) browsers:
http://caniuse.com/#feat=transforms2d

The only improvement I would probably make is to put the css within the template itself e.g.

<img ng-style="{'transform': num, '-webkit-transform': num, '-ms-transform': num }" />

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

2 participants