qingyangmoke / explorercanvas

Explorercanvas (excanvas.js) is an open source, Apache-licensed JavaScript library that implements the canvas API in Internet Explorer
Apache License 2.0
0 stars 0 forks source link

Exception when putting 'px' in the width and height properties of the canvas tag #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Declare the width and height properties of the canvas tag with "px". For
example: <canvas width="1000px" height="500px"></canvas>

Lines 154 and 161 throw exceptions:
el.style.width = attrs.width.nodeValue + 'px'
el.style.height = attrs.height.nodeValue + 'px'

Because the final value becomes '1000pxpx'.

Original issue reported on code.google.com by filipe.s...@gmail.com on 14 Aug 2009 at 2:31

GoogleCodeExporter commented 9 years ago
The width and height attributes are always expressed in pixels, so you must not 
put 
"px" at the end of the attributes' values : 

<canvas width="1000" height="500"></canvas>

Original comment by fabien.menager on 15 Aug 2009 at 7:42

GoogleCodeExporter commented 9 years ago

Original comment by erik.arv...@gmail.com on 20 Aug 2009 at 12:19