diff options
Diffstat (limited to 'ksvg/test/ecma/broken.svg')
-rw-r--r-- | ksvg/test/ecma/broken.svg | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ksvg/test/ecma/broken.svg b/ksvg/test/ecma/broken.svg new file mode 100644 index 00000000..82eb021e --- /dev/null +++ b/ksvg/test/ecma/broken.svg @@ -0,0 +1,30 @@ +<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010719//EN"
+ "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="6cm" height="5cm" viewBox="0 0 600 500">
+ <desc>Example script01 - invoke an ECMAScript function from an onclick event
+ </desc>
+ <!-- ECMAScript to change the radius with each click -->
+ <script type="text/ecmascript"> <![CDATA[
+ function circle_click(evt) {
+ var circle = evt.target;
+ var currentRadius = circle.r.baseVal.value;
+ if (currentRadius == 100)
+ circle.r.baseVal.value = currentRadius*2;
+ else
+ circle.r.baseVal.value = currentRadius*0.5;
+ }
+ ]]> </script>
+
+ <!-- Outline the drawing area with a blue line -->
+ <rect x="1" y="1" width="598" height="498" fill="none" stroke="blue"/>
+
+ <!-- Act on each click event -->
+ <circle onclick="circle_click(evt)" cx="300" cy="225" r="100"
+ fill="red"/>
+
+ <text x="300" y="480"
+ font-family="Verdana" font-size="35" text-anchor="middle">
+ Click on circle to change its size
+ </text>
+</svg>
|