tkormann 02/05/28 05:52:04 Modified: test-resources/org/apache/batik/test samplesRendering.xml samples/tests/spec/scripting remove.svg Added: samples/tests/spec/scripting removeOnclick.svg test-references/samples/tests/spec/scripting removeOnclick.png Log: add a new test. test remove on onclick Revision Changes Path 1.71 +2 -1 xml-batik/test-resources/org/apache/batik/test/samplesRendering.xml Index: samplesRendering.xml =================================================================== RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/test/samplesRendering.xml,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- samplesRendering.xml 25 May 2002 18:08:41 -0000 1.70 +++ samplesRendering.xml 28 May 2002 12:52:03 -0000 1.71 @@ -8,7 +8,7 @@ <!-- ========================================================================= --> <!-- @author [EMAIL PROTECTED] --> -<!-- @version $Id: samplesRendering.xml,v 1.70 2002/05/25 18:08:41 tkormann Exp $ --> +<!-- @version $Id: samplesRendering.xml,v 1.71 2002/05/28 12:52:03 tkormann Exp $ --> <!-- ========================================================================= --> <testSuite id="samplesRendering" name="samples and samples/test Rendering" class="org.apache.batik.test.svg.SamplesRenderingTest"> @@ -283,6 +283,7 @@ <test id="samples/tests/spec/scripting/polyline.svg" /> <test id="samples/tests/spec/scripting/rect.svg" /> <test id="samples/tests/spec/scripting/remove.svg" /> + <test id="samples/tests/spec/scripting/removeOnclick.svg" /> <test id="samples/tests/spec/scripting/transform.svg" /> <test id="samples/tests/spec/scripting/transform2.svg" /> <test id="samples/tests/spec/scripting/xyModifOnLoad.svg" /> 1.4 +3 -3 xml-batik/samples/tests/spec/scripting/remove.svg Index: remove.svg =================================================================== RCS file: /home/cvs/xml-batik/samples/tests/spec/scripting/remove.svg,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- remove.svg 19 Mar 2002 15:39:46 -0000 1.3 +++ remove.svg 28 May 2002 12:52:04 -0000 1.4 @@ -14,7 +14,7 @@ <!-- append child test --> <!-- --> <!-- @author [EMAIL PROTECTED] --> -<!-- @version $Id: remove.svg,v 1.3 2002/03/19 15:39:46 tkormann Exp $ --> +<!-- @version $Id: remove.svg,v 1.4 2002/05/28 12:52:04 tkormann Exp $ --> <!-- ====================================================================== --> <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> @@ -32,7 +32,7 @@ var svgNamespaceURI = "http://www.w3.org/2000/svg"; function remove(evt) { - var g = evt.target; + var g = evt.currentTarget; g.removeChild(g.firstChild); // remove grey g.removeChild(g.firstChild.nextSibling); // remove crimson g.removeChild(g.firstChild.nextSibling); // remove orange @@ -40,7 +40,7 @@ } function removeAll(evt) { - var g = evt.target; + var g = evt.currentTarget; while (g.hasChildNodes()) { g.removeChild(g.firstChild); } 1.1 xml-batik/samples/tests/spec/scripting/removeOnclick.svg Index: removeOnclick.svg =================================================================== <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- append child test --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: removeOnclick.svg,v 1.1 2002/05/28 12:52:04 tkormann Exp $ --> <!-- ====================================================================== --> <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500"> <title>removeChild test 'onload'</title> <text x="50%" y="45" class="title">removeChild test 'onclick'</text> <script type="text/ecmascript"> var svgNamespaceURI = "http://www.w3.org/2000/svg"; function remove(evt) { var g = evt.currentTarget; g.removeChild(g.firstChild); // remove grey g.removeChild(g.firstChild.nextSibling); // remove crimson g.removeChild(g.firstChild.nextSibling); // remove orange g.removeChild(g.firstChild); // remove gold } function removeAll(evt) { var g = evt.currentTarget; while (g.hasChildNodes()) { g.removeChild(g.firstChild); } } </script> <g onclick="remove(evt)"> <rect x="100" y="100" width="100" height="100" style="fill:#eee"/> <rect x="150" y="100" width="100" height="100" style="fill:gold"/> <rect x="200" y="100" width="100" height="100" style="fill:crimson"/> <rect x="250" y="100" width="100" height="100" style="fill:orange"/> </g> <g onclick="removeAll(evt)"> <rect x="100" y="300" width="100" height="100" style="fill:#eee"/> <rect x="150" y="300" width="100" height="100" style="fill:gold"/> <rect x="200" y="300" width="100" height="100" style="fill:crimson"/> <rect x="250" y="300" width="100" height="100" style="fill:orange"/> </g> </svg> 1.1 xml-batik/test-references/samples/tests/spec/scripting/removeOnclick.png <<Binary file>>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]