File: svg-cursor-changes.svg

package info (click to toggle)
qtwebkit 2.3.4.dfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 290,632 kB
  • sloc: cpp: 1,417,515; python: 85,048; ansic: 39,357; perl: 38,862; ruby: 10,313; objc: 9,505; xml: 8,679; asm: 3,864; yacc: 2,458; sh: 1,237; lex: 813; makefile: 592; java: 228; php: 79
file content (29 lines) | stat: -rw-r--r-- 2,211 bytes parent folder | download | duplicates (17)
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
<svg width="100%" height="100%" viewBox="0 0 300 600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<cursor id="mycursor" x="10" y="10" xlink:href="resources/webkit-background.png"/>

<!-- Clicking this circle should result in an instant update of the cursor location of this and the next circle (tested using DOM) -->
<circle onclick="document.getElementById('mycursor').setAttribute('x', '100');" cx="80" cy="150" r="70" fill="green" cursor="url(#mycursor)"/>

<!-- Clicking this circle should result in an instant update of the cursor location of this and the previous circle (tested using SVG DOM) -->
<circle onclick="document.getElementById('mycursor').x.baseVal.value = 100;" cx="230" cy="150" r="70" fill="green" cursor="url(#mycursor)"/>

<cursor id="mycursor2" x="10" y="10" xlink:href="resources/webkit-background.png"/>
<cursor id="mycursor3" x="10" y="10" xlink:href="resources/webkit-background.png"/>

<!-- Clicking this circle should result in an instant update of the cursor location (tested using DOM) -->
<circle onclick="document.getElementById('mycursor2').setAttribute('x', '100');" cx="80" cy="310" r="70" fill="green" cursor="url(#mycursor2)"/>

<!-- Clicking this circle should result in an instant update of the cursor location (tested using SVG DOM) -->
<circle onclick="document.getElementById('mycursor3').x.baseVal.value = 100;" cx="230" cy="310" r="70" fill="green" cursor="url(#mycursor3)"/>

<cursor id="mycursor4" x="10" y="10" xlink:href="resources/apple.jpg"/>

<!-- Clicking this circle should result in an instant update of the cursor image (tested using DOM) -->
<circle onclick="document.getElementById('mycursor4').setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', 'resources/webkit-background.png');" cx="80" cy="470" r="70" fill="green" cursor="url(#mycursor4)"/>

<cursor id="mycursor5" x="10" y="10" xlink:href="resources/apple.jpg"/>

<!-- Clicking this circle should result in an instant update of the cursor image (tested using SVG DOM) -->
<circle onclick="document.getElementById('mycursor5').href.baseVal = 'resources/webkit-background.png';" cx="230" cy="470" r="70" fill="green" cursor="url(#mycursor5)"/>

</svg>