Mercurial > defr > drupal > scald > dnd
annotate js/bt/other_libs/excanvas_0002/testcases/linewidth.html @ 35:abc9d39cfbe9
Switch the trigger from mouseover to click.
MouseOver is problematic if people want to interact with the content of the
popup, for example to click the play button of an swf player.
author | Franck Deroche <franck@defr.org> |
---|---|
date | Fri, 18 Sep 2009 15:11:03 +0200 |
parents | 0d557e6e73f7 |
children |
rev | line source |
---|---|
eads@18 | 1 <!DOCTYPE html> |
eads@18 | 2 <html> |
eads@18 | 3 <head> |
eads@18 | 4 <title>Line Width Test</title> |
eads@18 | 5 <style> |
eads@18 | 6 |
eads@18 | 7 body { |
eads@18 | 8 text-align: center |
eads@18 | 9 } |
eads@18 | 10 |
eads@18 | 11 </style> |
eads@18 | 12 <!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]--> |
eads@18 | 13 <script> |
eads@18 | 14 |
eads@18 | 15 window.onload = function() { |
eads@18 | 16 var ctx = document.getElementById('c').getContext('2d'); |
eads@18 | 17 |
eads@18 | 18 ctx.strokeStyle = 'black'; |
eads@18 | 19 ctx.lineWidth = 1; |
eads@18 | 20 for (var i = 0; i < 100; i++) { |
eads@18 | 21 ctx.beginPath(); |
eads@18 | 22 ctx.moveTo(49 + i / 100, i); |
eads@18 | 23 ctx.lineTo(49 + i / 100, i + 1); |
eads@18 | 24 ctx.closePath(); |
eads@18 | 25 ctx.stroke(); |
eads@18 | 26 } |
eads@18 | 27 |
eads@18 | 28 for (var i = 0; i < 100; i++) { |
eads@18 | 29 ctx.beginPath(); |
eads@18 | 30 ctx.moveTo(i, 49 + i / 100); |
eads@18 | 31 ctx.lineTo(i + 1, 49 + i / 100); |
eads@18 | 32 ctx.closePath(); |
eads@18 | 33 ctx.stroke(); |
eads@18 | 34 } |
eads@18 | 35 }; |
eads@18 | 36 |
eads@18 | 37 </script> |
eads@18 | 38 </head> |
eads@18 | 39 <body> |
eads@18 | 40 |
eads@18 | 41 <canvas id=c width=100 height=100></canvas> |
eads@18 | 42 |
eads@18 | 43 <p>This tests that lines work in the same way in different browsers when you are |
eads@18 | 44 using sub pixel coordinates.</p> |
eads@18 | 45 |
eads@18 | 46 </body> |
eads@18 | 47 </html> |