SVG coordinates with transform matrix

I have created a working example of what I believe you are describing on my site here: http://phrogz.net/svg/drag_under_transformation.xhtml In general, you convert the mouse cursor into the local space of an object by: Creating a mousemove event handler: var svg = document.getElementsByTagName(‘svg’)[0]; document.documentElement.addEventListener(‘mousemove’,function(evt){ … },false); In that event handler, convert the mouse coordinates (in pixels) … Read more

HTML5 Video / End of a Video Poster

A straightforward way of doing this: <script> var video = document.querySelector(‘video’); video.addEventListener(‘ended’, function() { video.load(); }); </script> Indeed when changing the src of a video tag you implicitly call a load() on it. This method has the caveat to request the media URL again and depending on caching settings it may re-download the full-length media … Read more

How to download file using anchor tag

In HTML5, in most browsers you can add a ‘download’ attribute to the a element. for example: <a href=”http://www.example.com/index.html” download>Download</a> Based on this question. How can I create download link in html?

How to convert to px?

<font size=1>- font size 1</font><br> <span style=”font-size:0.63em”>- font size: 0.63em</span><br> <font size=2>- font size 2</font><br> <span style=”font-size: 0.82em”>- font size: 0.82em</span><br> <font size=3>- font size 3</font><br> <span style=”font-size: 1.0em”>- font size: 1.0em</span><br> <font size=4>- font size 4</font><br> <span style=”font-size: 1.13em”>- font size: 1.13em</span><br> <font size=5>- font size 5</font><br> <span style=”font-size: 1.5em”>- font size: 1.5em</span><br> <font … Read more