Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dynamically change direction of icon? #28

Open
dfischer opened this issue Jun 5, 2015 · 1 comment
Open

How to dynamically change direction of icon? #28

dfischer opened this issue Jun 5, 2015 · 1 comment

Comments

@dfischer
Copy link

dfischer commented Jun 5, 2015

How do you dynamically change the direction of iconic with the svginjector? Since the svginjector removes the <img> element what are you supposed to do to update the direction of the svg? Do you have to completely remove that node from dom and try to re-render it or?

@protodave
Copy link
Contributor

Hey Daniel! SVGInjector itself doesn't do anything specific related to the display of SVG assets... it just gets them on the page by swapping out the related <img> tag. Once the SVG is on the page you are free to adjust its display using CSS3 2D & 3D transforms.

Or is this an Iconic specific question related to the dynamic "Smart Icons", some of which have a data-direction attribute? If so, take a look at the Smart Icon Guide to see how to update an icon via their built-in APIs and also via their attributes after the initial injection has take place at page load time.

Also, feel free to share a code snippet of what you are trying to do and I can help debug or explain further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants