expandable svg component

Discuss SVG code, accessible via the XML Editor.
celdem
Posts: 2
Joined: Wed Feb 13, 2013 1:45 am

expandable svg component

Postby celdem » Wed Feb 13, 2013 1:52 am

Good afternoon everyone;

First of all I would like to thank your for creating such a resources for people like me to benefit from it.

I am working on a small project for my university assignment I need your help. Because i could not find an answer for what i am looking actually.

My problem is;

I was wondering that is it possible to do such a possible thing with just using svg. here is the image;

http://s18.postimage.org/csyespybt/issue.jpg

when user clicks on this svg component in stage-1 it will expand and show another graph inside.
When user clicks on graph in stage-2 it will return to stage-1 again. It is like expandable component.

Thank you for separating time and reading this post despite your daily work.

Regards...

Can ELDEM

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: expandable svg component

Postby brynn » Wed Feb 13, 2013 7:53 pm

Image
Welcome to InkscapeForum!

Inkscape doesn't yet have animation capability. But SVG drawings made with Inkscape can be animated, in a few different ways. It can't be done with only SVG, to my knowledge. Probably what you're talking about would be done with scripts. I know that you'll be able to do the Stage 1, where you click and it opens a graph image. But I'm not sure about a Stage 2. I guess it's possible, but I couldn't give specifics. You'll have to either find or write a script for it. However, someone here wrote us up a little tutorial for something very similar to what you're describing. This should get you a long way towards your goal: viewtopic.php?f=8&t=12113. I can't remember if the artist made it to animate on mouseover or on a click, but either way, you should be able to get something out of it. And maybe some more info here: http://srufaculty.sru.edu/david.dailey/ ... htm#JSAnim.

Good luck and have fun :D

celdem
Posts: 2
Joined: Wed Feb 13, 2013 1:45 am

Re: expandable svg component

Postby celdem » Wed Feb 13, 2013 11:20 pm

Thank you so much for the examples i will take a look at them. It is so hard to find an answer for this question =)

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: expandable svg component

Postby chriswww » Thu May 09, 2013 5:08 pm

You could probably do this with SMIL, which is a SVG technology for simple animation effects with svg. My guess would be that you start out with the secondary graph/component at zero size and grow it (using SMIL syntax) to your nominal size over specified number of milliseconds. Most recent internet browsers should render SMIL, as it's part of the SVG specification.


Return to “SVG / XML Code”