Fx.Morph better css properties support
-
Joe Ally
(http://paste2.org/p/479962)[http://paste2.org/p/479962]. This is a quick fix and supports all properties that have shorthand capabilities but I didn't write a generic processor. Instead I noticed that your fx.morph module applies the styles to a dummy element(which is pretty neat). So I just set the individual properties to animate. For example if someone wanted to animate 'margin' to "1px 3px 5px 6px" I added instructions that tell the animator to animate each margin individually and since it gets the end styles from a dummy element this can be done very easily. For background position I just added a special case. Tommorow next week I might have a look at writting a generic proccessor
-
Joe Ally
Note: with my fix you must set background position in css first
-
MadRabbit
I think it will work faster if it will check the margin/padding value and if there are four units then use separated margins for each of them. and then it would be good to speed up the things a bit by using a single for() loop instead of several fancy calls, plus use string slices instead of regular expressions, plus would bee good to compact the things a bit by removing duplications. And then your code seems like don't remote the original property, there was a splice call I believe for that reason.
-
MadRabbit
but don't worry about it. I'm going to rework/reorganize the Fx.Morph code anyway, to get rid of most of the patches and exceptions, so there is no reason to wrap it with another one now
-
Joe Ally
Oh I didn't read the earlier comment...I wasted my time here :(
-
MadRabbit
Not at all, I see where you're going with that and probably will cherry-pick some stuff later.
And then I had completely missed the background-position feature, so I appreciate your help anyway
-
MadRabbit
- State changed from new to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.