Closed alkavan closed 8 years ago
I use translateY(-50%)
in my CSSs for vertical alignment. When I apply Move(selector).x(100)
on that particular elements, the translateY
gets overriden so I have to do Move(selector).x(100).y("-50%")
but that breaks all the Move.js library. Support has to be added into it.
SGTM! pull requests are welcome!
I have made a commit here: https://github.com/alkavan/move.js/commit/cd9a80a02c38c567fe7a36ab7710c0730db29fb2
This is an example of modified translateX() and translateY() methods to support passing percent values, for example translateX('60%') or translateX('-60%') would work now.
I think this is something that should be done to all types that support percent values, I can do this because I really need this functionality, but I wonder if you'll pull this changes if I'll add this to all methods, because while I don't really need this for all of methods, someone else might ...
UPDATE: also added to translate() method: https://github.com/alkavan/move.js/commit/d108addf231eaec15dcc075823246f2b20ffbc4d