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

Fix($animate) : svg element with classNameFilter animation fix. #14529

Merged
merged 1 commit into from
May 6, 2016

Conversation

sreeramu
Copy link
Contributor

@sreeramu sreeramu commented Apr 28, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
classNameFilter for animation with svg element should work same as the other elements.

What is the current behavior? (You can also link to an open issue here)
classNameFilter not working for svg element.

What is the new behavior (if this is a feature change)?
classNameFilter also handles svg element.

Does this PR introduce a breaking change?
NO

Please check if the PR fulfills these requirements

Other information:
This PR fix #14508 issue.

Fix($animate) : svg element with classNameFilter animation fix.

@Narretz
Copy link
Contributor

Narretz commented Apr 28, 2016

Looks good. I only wonder if getAttribute is much slower than className.

@sreeramu
Copy link
Contributor Author

@Narretz can we do like this?
angular.isString(node.className) ? node.className : node.getAttribute('class')

@jbedard
Copy link
Collaborator

jbedard commented Apr 28, 2016

I don't think it's worth the isString check. jQuery recently switched from className to get/setAttribute and actually reported it being faster: jquery/jquery#2268

@Narretz Narretz merged commit 81bf7ed into angular:master May 6, 2016
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.

ng-animate addClass, classNameFilter and svg element does not work together
4 participants