Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Fx.Morph better css properties support

#90

joeally @rightjs animating short hand. For example being able to animate 'margin' to "1px 3px 5px 6px" and being able to animate background position

probably would be cool to have some sort of generic properties processor that work though the list automatically without a predefined list of supported options

Reported by MadRabbit · October 21st, 2009 @ 11:51 PM

State: resolved
Milestone: 1.5.0 Release
Assigned to: nobody

Activity

  1. Joe Ally
    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

    October 22nd, 2009 @ 11:49 PM

  2. Joe Ally
    Joe Ally

    Note: with my fix you must set background position in css first

    October 23rd, 2009 @ 12:01 AM

  3. MadRabbit
    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.

    October 23rd, 2009 @ 12:13 AM

  4. MadRabbit
    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

    October 23rd, 2009 @ 12:21 AM

  5. Joe Ally
    Joe Ally

    i have made another one that supports generic properties. Accept that it's not working for properties like border-top-color yet (I don't know why). But I think this is more of what you are looking for

    October 28th, 2009 @ 05:07 PM

  6. Joe Ally
    Joe Ally

    Oh I didn't read the earlier comment...I wasted my time here :(

    October 28th, 2009 @ 05:44 PM

  7. MadRabbit
    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

    October 28th, 2009 @ 05:53 PM

  8. MadRabbit
    MadRabbit
    • State changed from new to resolved

    December 1st, 2009 @ 11:36 PM

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.