First, I'm new to this forum as well to xml. So please forgive me, if this is a realy simple question. I use inkscpae to draw paper based prototyes for user interfaces. Every window has it's own layer. May Idea is, instead of printing each layer to paper. Use a browser to test the interface.
So, I would like to add an action to an objekt. This may be done via Object/Properties/Interactive/OnClick or the xml editor in Inkscape. The action should move a specified layer to the front.
I found the code below which seams to do what I'm looking for. But I have no Idea what exactly I have to do with it
Code: Select all
function swap(parent, elem1, elem2)
{
var tmp = elem1.cloneNode(true);
parent.replaceChild(tmp, elem2);
parent.replaceChild(elem2, elem1);
}
See: http://www.mecxpert.de/svg/swap.html And here: http://www.w3.org/TR/2002/WD-SVG12-2002 ... awingorder
Could someone help me out with an example how to implement this or any other solution/hint/idea.
Thanks
~ben