1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<script><![CDATA[
function zoom(evt)
{
cible = evt.target.getAttributeNS(null , "id");
var svgdoc = evt.target.ownerDocument;
var obj = svgdoc.getElementById(cible);
svgdoc.getElementById(cible).setAttributeNS(null , "transform" , "matrix(2 0 0 2 ? ?)")
}
function normal(evt)
{
cible = evt.target.getAttributeNS(null , "id");
var svgdoc = evt.target.ownerDocument;
var obj = svgdoc.getElementById(cible);
svgdoc.getElementById(cible).setAttributeNS(null , "transform" , "matrix(1 0 0 1 ? ?)")
}
]]></script>
<g onmouseover="zoom(evt)" onmouseout="normal(evt)">
<rect id="rectangle0" x="0" y="0" width="140" height="190" stroke-width="1" stroke="black" fill="red" transform="matrix(1 0 0 1 300 50)" /></g>
<g onmouseover="zoom(evt)" onmouseout="normal(evt)">
<rect id="rectangle1" x="0" y="0" width="140" height="190" stroke-width="1" stroke="black" fill="red" transform="matrix(1 0 0 1 300 200)" /></g>
<g onmouseover="zoom(evt)" onmouseout="normal(evt)">
<rect id="rectangle2" x="0" y="0" width="140" height="190" stroke-width="1" stroke="black" fill="red" transform="matrix(1 0 0 1 300 400)" />
</g>
</svg> |
Partager