| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" |
| 3 |
"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd"> |
| 4 |
|
| 5 |
<!-- |
| 6 |
|
| 7 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 8 |
contributor license agreements. See the NOTICE file distributed with |
| 9 |
this work for additional information regarding copyright ownership. |
| 10 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 11 |
(the "License"); you may not use this file except in compliance with |
| 12 |
the License. You may obtain a copy of the License at |
| 13 |
|
| 14 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 15 |
|
| 16 |
Unless required by applicable law or agreed to in writing, software |
| 17 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 18 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 |
See the License for the specific language governing permissions and |
| 20 |
limitations under the License. |
| 21 |
|
| 22 |
--> |
| 23 |
<!-- ====================================================================== --> |
| 24 |
<!-- Modification of a rect's attributes --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ====================================================================== --> |
| 29 |
|
| 30 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 31 |
|
| 32 |
<svg id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 33 |
<title>'display' property on 'onload'</title> |
| 34 |
|
| 35 |
<text x="50%" y="45" class="title">'display' property on 'onload'</text> |
| 36 |
|
| 37 |
<script type="text/ecmascript"><![CDATA[ |
| 38 |
function changeDisplay(evt, newValue) { |
| 39 |
evt.target.getStyle().setProperty("display", newValue, ""); |
| 40 |
} |
| 41 |
]]></script> |
| 42 |
|
| 43 |
<linearGradient id="grad"> |
| 44 |
<stop style="stop-color:crimson" offset="0" /> |
| 45 |
<stop style="stop-color:gold" offset="1" /> |
| 46 |
</linearGradient> |
| 47 |
|
| 48 |
<g id="test-content" stroke="black" stroke-width="1"> |
| 49 |
|
| 50 |
<g onload="changeDisplay(evt, 'none')" style="display:inline"> |
| 51 |
<rect x="100" y="100" width="100" height="50" style="fill:#eee"/> |
| 52 |
<rect x="150" y="100" width="100" height="50" style="fill:gold"/> |
| 53 |
<rect x="200" y="100" width="100" height="50" style="fill:crimson"/> |
| 54 |
<rect x="250" y="100" width="100" height="50" style="fill:url(#grad)"/> |
| 55 |
<image x="300" y="100" width="50" height="50" |
| 56 |
xlink:href="../../resources/images/png2.png"/> |
| 57 |
</g> |
| 58 |
<g > |
| 59 |
<rect x="100" y="175" width="100" height="50" |
| 60 |
onload="changeDisplay(evt, 'none')" |
| 61 |
style="fill:#eee; display:inline"/> |
| 62 |
<rect x="150" y="175" width="100" height="50" |
| 63 |
onload="changeDisplay(evt, 'none')" |
| 64 |
style="fill:gold; display:inline"/> |
| 65 |
<rect x="200" y="175" width="100" height="50" |
| 66 |
onload="changeDisplay(evt, 'none')" |
| 67 |
style="fill:crimson; display:inline"/> |
| 68 |
<rect x="250" y="175" width="100" height="50" |
| 69 |
onload="changeDisplay(evt, 'none')" |
| 70 |
style="fill:url(#grad); display:inline"/> |
| 71 |
<image x="300" y="175" width="50" height="50" |
| 72 |
onload="changeDisplay(evt, 'none')" |
| 73 |
xlink:href="../../resources/images/png2.png"/> |
| 74 |
</g> |
| 75 |
|
| 76 |
<g onload="changeDisplay(evt, 'inline')" style="display:none"> |
| 77 |
<rect x="100" y="250" width="100" height="50" style="fill:#eee"/> |
| 78 |
<rect x="150" y="250" width="100" height="50" style="fill:gold"/> |
| 79 |
<rect x="200" y="250" width="100" height="50" style="fill:crimson"/> |
| 80 |
<rect x="250" y="250" width="100" height="50" style="fill:url(#grad)"/> |
| 81 |
<image x="300" y="250" width="50" height="50" |
| 82 |
xlink:href="../../resources/images/png2.png"/> |
| 83 |
</g> |
| 84 |
<g > |
| 85 |
<rect x="100" y="325" width="100" height="50" |
| 86 |
onload="changeDisplay(evt, 'inline')" |
| 87 |
style="fill:#eee; display:none"/> |
| 88 |
<rect x="150" y="325" width="100" height="50" |
| 89 |
onload="changeDisplay(evt, 'inline')" |
| 90 |
style="fill:gold; display:none"/> |
| 91 |
<rect x="200" y="325" width="100" height="50" |
| 92 |
onload="changeDisplay(evt, 'inline')" |
| 93 |
style="fill:crimson; display:none"/> |
| 94 |
<rect x="250" y="325" width="100" height="50" |
| 95 |
onload="changeDisplay(evt, 'inline')" |
| 96 |
style="fill:url(#grad); display:none"/> |
| 97 |
<image x="300" y="325" width="50" height="50" |
| 98 |
xlink:href="../../resources/images/png2.png" |
| 99 |
onload="changeDisplay(evt, 'inline')" |
| 100 |
style="display:none"/> |
| 101 |
</g> |
| 102 |
|
| 103 |
</g> |
| 104 |
</svg> |