Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($animateCss): use timing functions when present #12666

Closed

Conversation

wesleycho
Copy link
Contributor

  • Uses transition timing functions when present in styles instead of defaulting to linear

This is for #12656.

I need some guidance here @matsko - the style information is needed from the element on call to $animateCss when doing class manipulation, but I am not sure the best way to cache/retrieve the information here. Would you advise using the existing computeCachedCssStyles method here?

- Uses transition timing functions when present in styles instead of defaulting to `linear`
@Narretz
Copy link
Contributor

Narretz commented Sep 22, 2015

@matsko Could you give this a look?

@Narretz Narretz modified the milestones: 1.4.7, 1.4.8 Oct 1, 2015
@@ -232,6 +233,8 @@ var DETECT_STAGGER_CSS_PROPERTIES = {
animationDelay: ANIMATION_DELAY_PROP
};

var TRANSITION_EASING_VALUE = /ease|ease-in|ease-out|ease-in-out|linear|step-start|step-end|steps\(.+\)|cubic-bezier\(.+\)/;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the regex fails when I have something like transition: 1s ease-in-out color' (It will take the first match, which is ease).

@Narretz
Copy link
Contributor

Narretz commented Nov 18, 2015

Here's another PR to solve this problem: #13333
It's a bit more work than I expected. Basically, $animateCss would ignore all transition properties already on the element (except duration). I'll check with @matsko tomorrow if I got this right.

@petebacondarwin petebacondarwin modified the milestones: 1.4.8, 1.4.9 Nov 26, 2015
@wesleycho
Copy link
Contributor Author

Closing this due to #13333 superceding this

@wesleycho wesleycho closed this Dec 9, 2015
@wesleycho wesleycho deleted the fix/custom-timing-function branch December 9, 2015 21:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants