I am really unable to create a "use" element with a transform or x/y
attributes.
It's always in the cloned place, and I cannot move it.
Does it work for anybody out there?
Is it a batik bug?
sample code:
String translate = "100,100";
String link = "#sourceid";
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
Element elCard = document.createElementNS(svgNS, "use");
elCard.setAttributeNS(svgNS, "id", id + "instance");
elCard.setAttributeNS(svgNS, "transform", "translate(" + translate +
")");
//either the previous or these:
// elCard.setAttributeNS(svgNS, "x", "300");
// elCard.setAttributeNS(svgNS, "y", "100");
elCard.setAttributeNS(org.apache.batik.util.XMLConstants.XLINK_NAMESPACE_URI,
"href", link);
document.getElementById("mysvg").getParentNode().appendChild(elCard);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]